File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ linters:
27
27
- perfsprint
28
28
- predeclared
29
29
- revive
30
+ - staticcheck
30
31
- testifylint
31
32
- thelper
32
33
- unparam
@@ -35,7 +36,6 @@ linters:
35
36
- errcheck
36
37
- govet
37
38
- ineffassign
38
- - staticcheck
39
39
- unused
40
40
settings :
41
41
gocritic :
@@ -105,6 +105,25 @@ linters:
105
105
- ["ID"] # AllowList
106
106
- ["VM"] # DenyList
107
107
- - upperCaseConst : true # Extra parameter (upperCaseConst|skipPackageNameChecks)
108
+ staticcheck :
109
+ checks :
110
+ - all
111
+ # TODO: remove this lines after fixing all the issues
112
+ - -QF1001 # Apply De Morgan’s law
113
+ - -QF1002 # Convert untagged switch to tagged switch
114
+ - -QF1006 # Lift if+break into loop condition
115
+ - -S1001 # Replace for loop with call to copy
116
+ - -SA2002 # Called testing.T.FailNow or SkipNow in a goroutine, which isn’t allowed
117
+ - -SA1019 # Using a deprecated function, variable, constant or field
118
+ - -SA4003 # Comparing unsigned values against negative values is pointless
119
+ - -SA4004 # The loop exits unconditionally after one iteration
120
+ - -SA4006 # A value assigned to a variable is never read before being overwritten. Forgotten error check or dead code?
121
+ - -SA4008 # The variable in the loop condition never changes, are you incrementing the wrong variable?
122
+ - -SA5003 # Defers in infinite loops will never execute
123
+ - -SA9003 # Empty body in an if or else branch
124
+ - -ST1003 # Poorly chosen identifier
125
+ - -ST1005 # Incorrectly formatted error string
126
+ - -ST1017 # Don’t use Yoda conditions
108
127
testifylint :
109
128
enable-all : true
110
129
usetesting :
You can’t perform that action at this time.
0 commit comments