You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix QF1011: could omit type *os.File from declaration; it will be inferred from the right-hand side
* fix QF1012: Use fmt.Fprintf(x, ...) instead of x.Write(fmt.Sprintf(...))
* fix QF1001: could apply De Morgan's law
* fix QF1003: could use tagged switch
* fix weakCond: suspicious ; nil check may not be enough, check for len (gocritic)
* fix docStub: silencing go lint doc-comment warnings is unadvised
* fix builtinShadow: shadowing of predeclared identifier: error
* fix importShadow: shadow of imported package
* fix nestingReduce: invert if cond, replace body with , move old body after the statement
* useless-break: useless break in case clause (revive)
* Clear the redundant content in golangci.yaml file
Copy file name to clipboardExpand all lines: .golangci.yaml
+6-26Lines changed: 6 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -23,23 +23,8 @@ linters:
23
23
- "-ST1020"
24
24
- "-ST1021"
25
25
- "-ST1022"
26
-
##### TODO: fix and enable these
27
-
# 4 occurrences.
28
-
# Use fmt.Fprintf(x, ...) instead of x.Write(fmt.Sprintf(...)) https://staticcheck.dev/docs/checks#QF1012
29
-
- "-QF1012"
30
-
# 3 occurrences.
31
-
# Apply De Morgan’s law https://staticcheck.dev/docs/checks#QF1001
32
-
- "-QF1001"
33
-
# 9 occurrences.
34
-
# Convert if/else-if chain to tagged switch https://staticcheck.dev/docs/checks#QF1003
35
-
- "-QF1003"
36
-
# 1 occurrence.
37
-
# could omit type *os.File from declaration; it will be inferred from the right-hand side
38
-
- "-QF1011"
39
-
##### These have been vetted to be disabled.
40
-
# 19 occurrences. Omit embedded fields from selector expression https://staticcheck.dev/docs/checks#QF1008
41
-
# Usefulness is questionable.
42
26
- "-QF1008"
27
+
43
28
revive:
44
29
enable-all-rules: true
45
30
rules:
@@ -150,23 +135,22 @@ linters:
150
135
# - yodaStyleExpr
151
136
# - typeUnparen
152
137
153
-
##### TODO: fix and enable these
154
138
# We enabled these and we pass
155
139
- nilValReturn
156
-
#- weakCond # pkg/minikube/config/profile.go:61:9: weakCond: suspicious `cc.Nodes != nil && cc.Nodes[0].Name == node.Name`; nil check may not be enough, check for len (gocritic)
140
+
- weakCond
157
141
- indexAlloc
158
142
- rangeExprCopy
159
143
- boolExprSimplify
160
144
- commentedOutImport
161
-
#- docStub # pkg/minikube/tunnel/kic/service_tunnel.go:51:1: docStub: silencing go lint doc-comment warnings is unadvised (gocritic)
#- nestingReduce # pkg/minikube/tunnel/registry.go:94:3: nestingReduce: invert if cond, replace body with `continue`, move old body after the statement (gocritic)
153
+
- nestingReduce
170
154
- unnecessaryBlock
171
155
172
156
exclusions:
@@ -181,7 +165,3 @@ linters:
181
165
- path: '(.+)\.go$'
182
166
text: "Error return value of `.*` is not checked"
183
167
linter: errcheck
184
-
# This code is doubtful and I don't understand it. Location: Line 456
185
-
- path: 'cmd/minikube/cmd/docker-env.go'
186
-
text: "useless-break: useless break in case clause"
0 commit comments