Skip to content

Commit

Permalink
SA4008: change merge behavior to MergeIfAll
Browse files Browse the repository at this point in the history
MergeIfAny leads to false positives if the loop condition is a stub in
some build configurations.

(cherry picked from commit 3d6c86f)
  • Loading branch information
dominikh committed Apr 4, 2022
1 parent 1846305 commit 0e678cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion staticcheck/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ falsify results.`,
Title: `The variable in the loop condition never changes, are you incrementing the wrong variable?`,
Since: "2017.1",
Severity: lint.SeverityWarning,
MergeIf: lint.MergeIfAny,
MergeIf: lint.MergeIfAll,
},

"SA4009": {
Expand Down

0 comments on commit 0e678cb

Please sign in to comment.