Update Go and vendor dependencies

This commit is contained in:
dwrz
2026-10-09 15:30:45 +00:00
parent c1a64be31c
commit 550f257760
296 changed files with 308687 additions and 8460 deletions
+5 -2
View File
@@ -1,6 +1,7 @@
package sa6005
import (
"fmt"
"go/ast"
"go/token"
@@ -60,16 +61,18 @@ var (
func run(pass *analysis.Pass) (any, error) {
for node, m := range code.Matches(pass, checkToLowerToUpperComparisonQ) {
rn := pattern.NodeToAST(checkToLowerToUpperComparisonR.Root, m.State).(ast.Expr)
method := "strings.EqualFold"
if m.State["tok"].(token.Token) == token.NEQ {
rn = &ast.UnaryExpr{
Op: token.NOT,
X: rn,
}
method = "!" + method
}
report.Report(pass, node,
"should use strings.EqualFold instead",
report.Fixes(edit.Fix("Replace with strings.EqualFold", edit.ReplaceWithNode(pass.Fset, node, rn))))
fmt.Sprintf("should use %s instead", method),
report.Fixes(edit.Fix("replace with "+method, edit.ReplaceWithNode(pass.Fset, node, rn))))
}
return nil, nil
}