33# https://github.com/golangci/golangci/wiki/Configuration
44
55linters-settings :
6- depguard :
7- list-type : blacklist
8- packages :
9- # logging is allowed only by zerolog
10- - github.com/sirupsen/logrus
11- packages-with-error-message :
12- - github.com/sirupsen/logrus : " logging is allowed only by zerolog"
13- dupl :
14- threshold : 100
156 funlen :
167 lines : 100
178 statements : 80
18- gci :
19- local-prefixes : github.com/golangci/golangci-lint
209 goconst :
2110 min-len : 2
2211 min-occurrences : 2
@@ -28,133 +17,134 @@ linters-settings:
2817 - performance
2918 - style
3019 disabled-checks :
31- - dupImport # https://github.com/go-critic/go-critic/issues/845
20+ - dupImport # https://github.com/go-critic/go-critic/issues/845
3221 - ifElseChain
3322 - octalLiteral
3423 - whyNoLint
3524 - wrapperFunc
3625 gocyclo :
37- min-complexity : 20
26+ min-complexity : 18
3827 goimports :
3928 local-prefixes : github.com/golangci/golangci-lint
40- golint :
41- min-confidence : 0
42- gomnd :
43- settings :
44- mnd :
45- # don't include the "operation" and "assign"
46- checks :
47- - argument
48- - case
49- - condition
50- - return
29+ mnd :
30+ checks :
31+ - argument
32+ - case
33+ - condition
34+ - return
5135 govet :
52- check-shadowing : true
36+ shadow : true
5337 settings :
5438 printf :
5539 funcs :
5640 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
5741 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
5842 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
5943 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
60- maligned :
61- suggest-new : true
44+ lll :
45+ line-length : 140
6246 misspell :
6347 locale : US
6448 nolintlint :
65- allow-unused : false # report any unused nolint directives
66- require-explanation : false # don't require an explanation for nolint directives
67- require-specific : false # don't require nolint directives to be specific about which linter is being skipped
49+ allow-unused : false # report any unused nolint directives
50+ require-explanation : false # don't require an explanation for nolint directives
51+ require-specific : false # don't require nolint directives to be specific about which linter is being skipped
6852
6953linters :
7054 # please, do not use `enable-all`: it's deprecated and will be removed soon.
7155 # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
72- disable-all : true
56+ disable-all : false
7357 enable :
58+ - asasalint
7459 - asciicheck
60+ - bidichk
7561 - bodyclose
62+ - canonicalheader
63+ - containedctx
64+ - contextcheck
65+ - copyloopvar
66+ - cyclop
67+ - decorder
7668 - dogsled
77- - errcheck
78- - exportloopref
69+ - dupword
70+ - durationcheck
71+ - err113
72+ - errchkjson
73+ - errname
74+ - errorlint
7975 - exhaustive
76+ - fatcontext
77+ - forcetypeassert
8078 - funlen
79+ - gocheckcompilerdirectives
80+ - gochecknoinits
81+ - gochecknoglobals
8182 - gochecknoinits
83+ - gocognit
8284 - goconst
8385 - gocritic
8486 - gocyclo
8587 - godot
86- # - goerr113 # temporary disabled
8788 - gofmt
8889 - goimports
8990 - goprintffuncname
9091 - gosec
91- - gosimple
92- - govet
93- - ineffassign
92+ - gosmopolitan
93+ - grouper
94+ - importas
95+ - inamedparam
96+ - interfacebloat
97+ - intrange
98+ - lll
99+ - makezero
100+ - mirror
94101 - misspell
102+ - mnd
103+ - musttag
95104 - nakedret
105+ - nestif
106+ - nilerr
107+ - nilnil
96108 - noctx
97- # - rowserrcheck # disable https://github.com/golangci/golangci-lint/issues/2649.
98- - staticcheck
109+ - nolintlint
110+ - nonamedreturns
111+ - perfsprint
112+ - prealloc
113+ - predeclared
114+ - reassign
115+ - rowserrcheck
99116 - stylecheck
100117 - testpackage
101- - typecheck
102118 - unconvert
103119 - unparam
104- - unused
120+ - usestdlibvars
121+ - wastedassign
122+ - whitespace
123+ - zerologlint
105124
106- # don't enable:
125+ # don't enable:
107126 # - depguard
108127 # - dupl
128+ # - exhaustruct
129+ # - gci
130+ # - ginkgolinter
109131 # - gochecknoglobals
110132 # - gocognit
111133 # - godox
112- # - gomnd
134+ # - gofumpt
135+ # - gomoddirectives
136+ # - ireturn
113137 # - lll
114- # - nestif
138+ # - nlreturn
115139 # - nolintlint # conflict with 1.19 gofmt changes
140+ # - protogetter
116141 # - prealloc
117142 # - revive
118143 # - wsl
119- # - whitespace
144+ # - wrapcheck
120145
121146issues :
122- # List of regexps of issue texts to exclude, empty list by default.
123- # But independently from this option we use default exclude patterns,
124- # it can be disabled by `exclude-use-default: false`. To list all
125- # excluded by default patterns execute `golangci-lint run --help`
126- exclude :
127- - declaration of "(err|ctx)" shadows declaration at
128- - shadow of imported from 'github.com/stretchr/testify/assert' package 'assert'
129- # Excluding configuration per-path, per-linter, per-text and per-source
130147 exclude-rules :
131- - path : _test\.go
132- linters :
133- - gomnd
134- # https://github.com/go-critic/go-critic/issues/926
135- - text : " unnecessaryDefer:"
136- linters :
137- - gocritic
138148 - text : " unnamedResult:"
139149 linters :
140- - gocritic
141- - path : \.resolvers\.go
142- text : " typeDefFirst:"
143- linters :
144- - gocritic
145- - path : \.resolvers\.go
146- text : " paramTypeCombine:"
147- linters :
148- - gocritic
149- - path : \.resolvers\.go
150- text : " hugeParam:"
151- linters :
152- - gocritic
153- - text : " G404"
154- linters :
155- - gosec
156-
157- run :
158- timeout : 5m
159- skip-dirs :
160- - aserto/directory
150+ - gocritic
0 commit comments