-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yaml
More file actions
25 lines (25 loc) · 912 Bytes
/
.golangci.yaml
File metadata and controls
25 lines (25 loc) · 912 Bytes
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
version: "2"
linters:
enable:
- errcheck # unchecked errors
- govet # suspicious constructs
- staticcheck # comprehensive static analysis
- ineffassign # useless assignments
- unused # unused code
- gocritic # opinionated but catches real bugs
- errorlint # proper error wrapping/comparison
- modernize # suggest modern Go idioms (wg.Go, etc.)
- noctx # requests without context
- bodyclose # unclosed HTTP response bodies
- usetesting # enforce t.Context() over context.Background() in tests
settings:
errcheck:
exclude-functions:
- (io.Closer).Close # bodyclose linter handles HTTP resp.Body; other Close() checked by closeandlog analyzer
usetesting:
context-background: true
context-todo: true
formatters:
enable:
- gofmt
- goimports