...
1linters-settings:
2 funlen:
3 lines: 140
4 statements: 50
5 gci:
6 local-prefixes: github.com/golangci/golangci-lint
7 goconst:
8 min-len: 2
9 min-occurrences: 2
10 gocritic:
11 enabled-tags:
12 - diagnostic
13 - experimental
14 - opinionated
15 - performance
16 - style
17 disabled-checks:
18 - dupImport # https://github.com/go-critic/go-critic/issues/845
19 - ifElseChain
20 - octalLiteral
21 - whyNoLint
22 - wrapperFunc
23 - sqlQuery # used by tests
24 gocyclo:
25 min-complexity: 20
26 goimports:
27 local-prefixes: github.com/golangci/golangci-lint
28 golint:
29 min-confidence: 0
30 gomnd:
31 settings:
32 mnd:
33 # don't include the "operation" and "assign"
34 checks: argument,case,condition,return
35 govet:
36 check-shadowing: true
37 settings:
38 printf:
39 funcs:
40 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
41 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
42 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
43 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
44 lll:
45 line-length: 140
46 maligned:
47 suggest-new: true
48 misspell:
49 locale: US
50 nolintlint:
51 allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
52 allow-unused: false # report any unused nolint directives
53 require-explanation: false # don't require an explanation for nolint directives
54 require-specific: false # don't require nolint directives to be specific about which linter is being skipped
55 exhaustive:
56 default-signifies-exhaustive: true
57
58linters:
59 # please, do not use `enable-all`: it's deprecated and will be removed soon.
60 # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
61 disable-all: true
62 enable:
63 - asciicheck
64 - bodyclose
65 - deadcode
66 - depguard
67 - dogsled
68 - errcheck
69 - exportloopref
70 - exhaustive
71 - errcheck
72 - errorlint
73 - funlen
74 - forbidigo
75 - forcetypeassert
76 - goconst
77 - gocritic
78 - gocyclo
79 - gofmt
80 - goimports
81 - golint
82 - gomnd
83 - goprintffuncname
84 - gosec
85 - gosimple
86 - govet
87 - ifshort
88 - ineffassign
89 - lll
90 - makezero
91 - misspell
92 - nakedret
93 - nilerr
94 - noctx
95 - nolintlint
96 - prealloc
97 - predeclared
98 - rowserrcheck
99 - staticcheck
100 - structcheck
101 - stylecheck
102 - testpackage
103 - typecheck
104 - unconvert
105 - unparam
106 - unused
107 - varcheck
108 - whitespace
109
110 # don't enable:
111 # - gochecknoglobals
112 # - gocognit
113 # - godot
114 # - godox
115 # - goerr113
116 # - interfacer
117 # - maligned
118 # - nestif
119 # - revive
120 # - wsl
121 # - wrapcheck
122
123issues:
124 # Excluding configuration per-path, per-linter, per-text and per-source
125 exclude-rules:
126 - path: _test\.go
127 linters:
128 - gomnd
129
130 # https://github.com/go-critic/go-critic/issues/926
131 - linters:
132 - gocritic
133 text: "unnecessaryDefer:"
134
135run:
136 skip-dirs:
137 - test/testdata_etc
138 - internal/cache
139 - internal/renameio
140 - internal/robustio
View as plain text