1- ---
1+ version : " 2 "
22run :
33 concurrency : 12
4- timeout : 1m
4+ build-tags :
5+ - testing
6+ modules-download-mode : vendor
57 issues-exit-code : 1
68 tests : true
7- # list of build tags, all linters use it. Default is empty list.
8- build-tags : ['testing']
9-
10- # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
11- # If invoked with -mod=readonly, the go command is disallowed from the implicit
12- # automatic updating of go.mod described above. Instead, it fails when any changes
13- # to go.mod are needed. This setting is most useful to check that go.mod does
14- # not need updates, such as in a continuous integration and testing system.
15- # If invoked with -mod=vendor, the go command assumes that the vendor
16- # directory holds the correct copies of dependencies and ignores
17- # the dependency descriptions in go.mod.
18- modules-download-mode : vendor
19-
20- # output configuration options
21- output :
22- # print lines of code with issue, default is true
23- print-issued-lines : true
24-
25- # print linter name in the end of issue text, default is true
26- print-linter-name : true
27-
28-
29- # It's a .golangci.yml config file of this repo: we enable more linters than the default and have more strict settings:
30-
31- linters-settings :
32- dupl :
33- threshold : 100
34- funlen :
35- lines : 100
36- statements : 50
37- goconst :
38- min-len : 2
39- min-occurrences : 2
40- gocritic :
41- enabled-tags :
42- - diagnostic
43- - experimental
44- - opinionated
45- - performance
46- - style
47- disabled-checks :
48- - ifElseChain
49- - octalLiteral
50- - unnamedResult
51- - whyNoLint
52- - wrapperFunc
53- gocyclo :
54- min-complexity : 15
55- goimports :
56- local-prefixes : github.com/golangci/golangci-lint
57- govet :
58- settings :
59- printf :
60- funcs :
61- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
62- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
63- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
64- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
65- lll :
66- line-length : 140
67- misspell :
68- locale : US
69-
709linters :
71- # please, do not use `enable-all`: it's deprecated and will be removed soon.
72- # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
73- # disable-all: true
7410 enable :
7511 - asasalint
7612 - asciicheck
@@ -84,39 +20,30 @@ linters:
8420 - dupl
8521 - dupword
8622 - durationcheck
87- - errcheck
23+ - err113
8824 - errchkjson
8925 - errname
9026 - errorlint
9127 - exhaustive
9228 - funlen
93- - gci
9429 - gocognit
9530 - goconst
9631 - gocritic
9732 - gocyclo
98- # - godox
99- - err113
100- - gofmt
10133 - goheader
102- - goimports
103- - mnd
10434 - gomoddirectives
10535 - gomodguard
10636 - goprintffuncname
10737 - gosec
108- - gosimple
109- - govet
11038 - grouper
11139 - importas
112- - ineffassign
11340 - interfacebloat
114- # - ireturn
11541 - lll
11642 - loggercheck
11743 - maintidx
11844 - makezero
11945 - misspell
46+ - mnd
12047 - nestif
12148 - nilerr
12249 - nilnil
@@ -130,27 +57,80 @@ linters:
13057 - rowserrcheck
13158 - sqlclosecheck
13259 - staticcheck
133- - stylecheck
13460 - testableexamples
135- # - testpackage
13661 - thelper
13762 - unconvert
13863 - unparam
139- - unused
14064 - usestdlibvars
14165 - wastedassign
14266 - whitespace
14367 - wrapcheck
144-
145- # don't enable:
146-
147- issues :
148- exclude :
149- - ' shadow: declaration of "err" shadows declaration at'
150- # Excluding configuration per-path, per-linter, per-text and per-source
151- exclude-rules :
152- - path : _test\.go
153- linters :
154- - funlen
155- - cyclop
156-
68+ settings :
69+ dupl :
70+ threshold : 100
71+ funlen :
72+ lines : 100
73+ statements : 50
74+ goconst :
75+ min-len : 2
76+ min-occurrences : 2
77+ gocritic :
78+ disabled-checks :
79+ - ifElseChain
80+ - octalLiteral
81+ - unnamedResult
82+ - whyNoLint
83+ - wrapperFunc
84+ enabled-tags :
85+ - diagnostic
86+ - experimental
87+ - opinionated
88+ - performance
89+ - style
90+ gocyclo :
91+ min-complexity : 15
92+ govet :
93+ settings :
94+ printf :
95+ funcs :
96+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
97+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
98+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
99+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
100+ lll :
101+ line-length : 140
102+ misspell :
103+ locale : US
104+ exclusions :
105+ generated : lax
106+ presets :
107+ - comments
108+ - common-false-positives
109+ - legacy
110+ - std-error-handling
111+ rules :
112+ - linters :
113+ - cyclop
114+ - funlen
115+ path : _test\.go
116+ - path : (.+)\.go$
117+ text : ' shadow: declaration of "err" shadows declaration at'
118+ paths :
119+ - third_party$
120+ - builtin$
121+ - examples$
122+ formatters :
123+ enable :
124+ - gci
125+ - gofmt
126+ - goimports
127+ settings :
128+ goimports :
129+ local-prefixes :
130+ - github.com/golangci/golangci-lint
131+ exclusions :
132+ generated : lax
133+ paths :
134+ - third_party$
135+ - builtin$
136+ - examples$
0 commit comments