-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
33 lines (30 loc) · 1.41 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
run:
timeout: 5m
issues-exit-code: 1
tests: true
modules-download-mode: readonly
go: '1.23'
issues:
exclude-use-default: false # Use default excluded issues
max-issues-per-linter: 0 # Maximum number of issues per linter (0 = no limit)
max-same-issues: 0 # Maximum number of identical issues (0 = no limit)
linters:
disable-all: true
enable:
- bodyclose # Ensure HTTP response bodies are successfully closed.
- contextcheck # Ensure context is properly passed and inherited.
- gofmt # Check if code is properly formatted.
- errname # Ensure sentinel errors are prefixed with `Err` and types end with `Error`.
- errcheck # Ensure all errors are checked.
- errorlint # Detect issues with error wrapping (Go 1.13+).
- godot # Check if comments end with a period.
- misspell # Check for common misspellings in comments.
- nilerr # Detect simultaneous return of nil error and invalid value.
- tparallel # Detect inappropriate usage of `t.Parallel()` in tests.
- unparam # Report unused function parameters.
- whitespace # Detect trailing/leading whitespace.
- gosec # Inspects source code for security problems
- unused # Detect unused constants, variables, functions and types.
- govet # Report suspicious constructs
output:
show-stats: true