/
.golangci.yml
45 lines (41 loc) · 1.09 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
34
35
36
37
38
39
40
41
42
43
44
45
run:
timeout: 10m
output:
print-issued-lines: true
print-linter-name: true
issues:
max-same-issues: 0
max-issues-per-linter: 0
linters:
enable:
- containedctx # structs contain a context
# - cyclop # function and package cyclomatic dependencies
- deadcode
- dupl # code clone
- errcheck # unchecked errors
- errname # erorrs are named correctly
- errorlint # errors not wrapped for 1.13
- goconst # strings that should be constants
- gofmt
- gosec # security
- govet
- misspell
- nestif # deeply nested ifs
- nilnil # returns nil error and invalid value
- prealloc
- predeclared # shadows Go predeclared identifier
- revive # golint replacement
- staticcheck # better go vet
- structcheck # unused struct fields
- stylecheck
- thelper # test helpers are annotated as such
- unconvert # unnecessary conversions
- unparam # unused function params
- wastedassign
- whitespace # leading and trailing whitespace
linters-settings:
stylecheck:
checks:
- "all"
govet:
check-shadowing: true