@@ -39,6 +39,8 @@ linters:
3939 - ginkgolinter # [if you use ginkgo/gomega] enforces standards of using ginkgo and gomega
4040 - gochecknoglobals # checks that no global variables exist
4141 - cyclop # replaced by revive
42+ - gocyclo # replaced by revive
43+ - forbidigo # needs configuration to be useful
4244 - funlen # replaced by revive
4345 - godox # TODO's are OK
4446 - ireturn # It's OK
@@ -47,6 +49,7 @@ linters:
4749 - goconst # finds repeated strings that could be replaced by a constant
4850 - goheader # checks is file header matches to pattern
4951 - gomodguard # [use more powerful depguard] allow and block lists linter for direct Go module dependencies
52+ - gomoddirectives
5053 - err113 # bad advice about dynamic errors
5154 - lll # [replaced by golines] reports long lines
5255 - mnd # detects magic numbers, duplicated by revive
@@ -98,6 +101,7 @@ linters:
98101 errcheck :
99102 # Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
100103 check-type-assertions : true
104+ check-blank : true
101105
102106 exhaustive :
103107 # Program elements to check for exhaustiveness.
@@ -148,10 +152,10 @@ linters:
148152
149153 nakedret :
150154 # Default: 30
151- max-func-lines : 4
155+ max-func-lines : 7
152156
153157 nestif :
154- min-complexity : 12
158+ min-complexity : 15
155159
156160 nolintlint :
157161 # Exclude following linters from requiring an explanation.
@@ -167,24 +171,21 @@ linters:
167171 rules :
168172 - name : add-constant
169173 severity : warning
170- disabled : false
171- exclude : [""]
172- arguments :
173- - max-lit-count : " 5"
174- allow-strs : ' "","\n"'
175- allow-ints : " 0,1,2,3,256,1024"
176- allow-floats : " 0.0,0.,1.0,1.,2.0,2."
174+ disabled : true
177175 - name : cognitive-complexity
178- arguments : [50]
176+ disabled : true # prefer maintidx
179177 - name : cyclomatic
180- severity : warning
181- arguments : [30]
178+ disabled : true # prefer maintidx
182179 - name : function-length
183180 arguments : [150, 225]
184181 - name : line-length-limit
185182 arguments : [150]
186183 - name : nested-structs
187184 disabled : true
185+ - name : max-public-structs
186+ arguments : [10]
187+ - name : flag-parameter # fixes are difficult
188+ disabled : true
188189
189190 rowserrcheck :
190191 # database/sql is always checked.
@@ -206,8 +207,14 @@ linters:
206207 os-temp-dir : true
207208
208209 varnamelen :
209- max-distance : 40
210+ max-distance : 75
210211 min-name-length : 2
212+ check-receivers : false
213+ ignore-names :
214+ - r
215+ - w
216+ - f
217+ - err
211218
212219 exclusions :
213220 # Default: []
@@ -225,6 +232,8 @@ linters:
225232 linters :
226233 - dupl
227234 - gosec
235+ - godot
236+ - govet # alignment
228237 - noctx
229238 - perfsprint
230239 - revive
0 commit comments