-
-
Notifications
You must be signed in to change notification settings - Fork 376
Expand file tree
/
Copy path.golangci.yml
More file actions
75 lines (61 loc) · 1.49 KB
/
.golangci.yml
File metadata and controls
75 lines (61 loc) · 1.49 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "2"
run:
timeout: 10m
tests: true
modules-download-mode: readonly
go: "1.24"
linters:
enable:
# Default linters
- errcheck # Checking for unchecked errors
- govet # Reports suspicious constructs
- ineffassign # Detects unused assignments
- staticcheck # Comprehensive static analysis
- unused # Checks for unused code
# Code quality linters
- bodyclose # Checks HTTP response body is closed
- durationcheck # Check time.Duration issues
- errorlint # Error handling problems
- copyloopvar # Checks loop variable captures
- noctx # HTTP requests without context
- nilerr # Returns nil even when error is not nil
# Style linters
- misspell # Finds misspelled words
- whitespace # Leading/trailing whitespace
disable:
- depguard
- exhaustive
- gochecknoglobals
- lll
- wsl
formatters:
enable:
- gofmt
- goimports
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
govet:
enable:
- shadow
staticcheck:
checks: ["all", "-ST1000", "-ST1003", "-QF1008", "-SA1029", "-SA9003"]
issues:
new: true
exclude-dirs:
- vendor
- third_party
- generated
exclude-rules:
- path: _test\.go
linters:
- errcheck
- noctx
- staticcheck
- path: "generated"
linters:
- staticcheck
- govet
max-issues-per-linter: 0
max-same-issues: 0