-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy path.golangci.yml
More file actions
62 lines (58 loc) · 1.57 KB
/
.golangci.yml
File metadata and controls
62 lines (58 loc) · 1.57 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
version: "2"
run:
timeout: 5m
linters:
default: none
enable:
- govet
- errcheck
- staticcheck
- unused
- ineffassign
settings:
govet:
disable:
- fieldalignment # too noisy, requires significant refactoring
errcheck:
exclude-functions:
- (io.Closer).Close
- (net.Conn).Close
- (*os.File).Close
- (net/http.ResponseWriter).Write
- os.Remove
- os.RemoveAll
- os.Setenv
- fmt.Fprint
- fmt.Fprintf
- fmt.Fprintln
- syscall.Close
staticcheck:
checks:
- "all"
- "-ST1000" # package comments - too noisy for existing codebase
- "-ST1003" # naming conventions (e.g., CrioId vs CrioID) - would break public API
- "-ST1020" # comment format on exported methods - too many to fix
- "-ST1021" # comment format on exported types - too many to fix
- "-ST1022" # comment format on exported consts - too many to fix
- "-QF*" # disable quickfix suggestions
exclusions:
rules:
# Exclude errcheck in test files for cleaner test code
- linters:
- errcheck
path: "_test\\.go$"
# Exclude errcheck for Close() calls on any type
- linters:
- errcheck
text: "Error return value of .*.Close.* is not checked"
# Exclude govet printf check false positives
- linters:
- govet
text: "printf: non-constant format string"
formatters:
enable:
- gofmt
- goimports
issues:
max-issues-per-linter: 0
max-same-issues: 0