@@ -67,6 +67,12 @@ output:
6767
6868# all available settings of specific linters
6969linters-settings :
70+ dogsled :
71+ # checks assignments with too many blank identifiers; default is 2
72+ max-blank-identifiers : 2
73+ dupl :
74+ # tokens count to trigger issue, 150 by default
75+ threshold : 100
7076 errcheck :
7177 # report about not checking of errors in type assetions: `a := b.(MyStruct)`;
7278 # default is false: such cases aren't reported by default.
@@ -84,11 +90,64 @@ linters-settings:
8490 # path to a file containing a list of functions to exclude from checking
8591 # see https://github.com/kisielk/errcheck#excluding-functions for details
8692 exclude : /path/to/file.txt
87-
8893 funlen :
8994 lines : 60
9095 statements : 40
96+ gocognit :
97+ # minimal code complexity to report, 30 by default (but we recommend 10-20)
98+ min-complexity : 10
99+ goconst :
100+ # minimal length of string constant, 3 by default
101+ min-len : 3
102+ # minimal occurrences count to trigger, 3 by default
103+ min-occurrences : 3
104+ gocritic :
105+ # Which checks should be enabled; can't be combined with 'disabled-checks';
106+ # See https://go-critic.github.io/overview#checks-overview
107+ # To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
108+ # By default list of stable checks is used.
109+ enabled-checks :
110+ - rangeValCopy
111+
112+ # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
113+ disabled-checks :
114+ - regexpMust
115+
116+ # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
117+ # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
118+ enabled-tags :
119+ - performance
91120
121+ settings : # settings passed to gocritic
122+ captLocal : # must be valid enabled check name
123+ paramsOnly : true
124+ rangeValCopy :
125+ sizeThreshold : 32
126+ gocyclo :
127+ # minimal code complexity to report, 30 by default (but we recommend 10-20)
128+ min-complexity : 10
129+ godox :
130+ # report any comments starting with keywords, this is useful for TODO or FIXME comments that
131+ # might be left in the code accidentally and should be resolved before merging
132+ keywords : # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
133+ - NOTE
134+ - OPTIMIZE # marks code that should be optimized before merging
135+ - HACK # marks hack-arounds that should be removed before merging
136+ gofmt :
137+ # simplify code: gofmt with `-s` option, true by default
138+ simplify : true
139+ goimports :
140+ # put imports beginning with prefix after 3rd-party packages;
141+ # it's a comma-separated list of prefixes
142+ local-prefixes : github.com/org/project
143+ golint :
144+ # minimal confidence for issues, default is 0.8
145+ min-confidence : 0.8
146+ gomnd :
147+ settings :
148+ mnd :
149+ # the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
150+ checks : argument,case,condition,operation,return,assign
92151 govet :
93152 # report about shadowed variables
94153 check-shadowing : true
@@ -109,33 +168,6 @@ linters-settings:
109168 disable :
110169 - shadow
111170 disable-all : false
112- golint :
113- # minimal confidence for issues, default is 0.8
114- min-confidence : 0.8
115- gofmt :
116- # simplify code: gofmt with `-s` option, true by default
117- simplify : true
118- goimports :
119- # put imports beginning with prefix after 3rd-party packages;
120- # it's a comma-separated list of prefixes
121- local-prefixes : github.com/org/project
122- gocyclo :
123- # minimal code complexity to report, 30 by default (but we recommend 10-20)
124- min-complexity : 10
125- gocognit :
126- # minimal code complexity to report, 30 by default (but we recommend 10-20)
127- min-complexity : 10
128- maligned :
129- # print struct with more effective memory layout or not, false by default
130- suggest-new : true
131- dupl :
132- # tokens count to trigger issue, 150 by default
133- threshold : 100
134- goconst :
135- # minimal length of string constant, 3 by default
136- min-len : 3
137- # minimal occurrences count to trigger, 3 by default
138- min-occurrences : 3
139171 depguard :
140172 list-type : blacklist
141173 include-go-root : false
@@ -144,34 +176,22 @@ linters-settings:
144176 packages-with-error-message :
145177 # specify an error message to output when a blacklisted package is used
146178 - github.com/sirupsen/logrus : " logging is allowed only by logutils.Log"
179+ lll :
180+ # max line length, lines longer will be reported. Default is 120.
181+ # '\t' is counted as 1 character by default, and can be changed with the tab-width option
182+ line-length : 120
183+ # tab width in spaces. Default to 1.
184+ tab-width : 1
185+ maligned :
186+ # print struct with more effective memory layout or not, false by default
187+ suggest-new : true
147188 misspell :
148189 # Correct spellings using locale preferences for US or UK.
149190 # Default is to use a neutral variety of English.
150191 # Setting locale to US will correct the British spelling of 'colour' to 'color'.
151192 locale : US
152193 ignore-words :
153194 - someword
154- lll :
155- # max line length, lines longer will be reported. Default is 120.
156- # '\t' is counted as 1 character by default, and can be changed with the tab-width option
157- line-length : 120
158- # tab width in spaces. Default to 1.
159- tab-width : 1
160- rowserrcheck :
161- packages :
162- - github.com/jmoiron/sqlx
163- unused :
164- # treat code as a program (not a library) and report unused exported identifiers; default is false.
165- # XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
166- # if it's called for subdir of a project it can't find funcs usages. All text editor integrations
167- # with golangci-lint call it on a directory with the changed file.
168- check-exported : false
169- unparam :
170- # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
171- # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
172- # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
173- # with golangci-lint call it on a directory with the changed file.
174- check-exported : false
175195 nakedret :
176196 # make an issue if func has more lines of code than this setting and it has naked returns; default is 30
177197 max-func-lines : 30
@@ -184,39 +204,21 @@ linters-settings:
184204 simple : true
185205 range-loops : true # Report preallocation suggestions on range loops, true by default
186206 for-loops : false # Report preallocation suggestions on for loops, false by default
187- gocritic :
188- # Which checks should be enabled; can't be combined with 'disabled-checks';
189- # See https://go-critic.github.io/overview#checks-overview
190- # To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
191- # By default list of stable checks is used.
192- enabled-checks :
193- - rangeValCopy
194-
195- # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
196- disabled-checks :
197- - regexpMust
198-
199- # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
200- # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
201- enabled-tags :
202- - performance
203-
204- settings : # settings passed to gocritic
205- captLocal : # must be valid enabled check name
206- paramsOnly : true
207- rangeValCopy :
208- sizeThreshold : 32
209- godox :
210- # report any comments starting with keywords, this is useful for TODO or FIXME comments that
211- # might be left in the code accidentally and should be resolved before merging
212- keywords : # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
213- - NOTE
214- - OPTIMIZE # marks code that should be optimized before merging
215- - HACK # marks hack-arounds that should be removed before merging
216- dogsled :
217- # checks assignments with too many blank identifiers; default is 2
218- max-blank-identifiers : 2
219-
207+ rowserrcheck :
208+ packages :
209+ - github.com/jmoiron/sqlx
210+ unparam :
211+ # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
212+ # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
213+ # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
214+ # with golangci-lint call it on a directory with the changed file.
215+ check-exported : false
216+ unused :
217+ # treat code as a program (not a library) and report unused exported identifiers; default is false.
218+ # XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
219+ # if it's called for subdir of a project it can't find funcs usages. All text editor integrations
220+ # with golangci-lint call it on a directory with the changed file.
221+ check-exported : false
220222 whitespace :
221223 multi-if : false # Enforces newlines (or comments) after every multi-line if statement
222224 multi-func : false # Enforces newlines (or comments) after every multi-line function signature
0 commit comments