Add staticcheck tool

This commit is contained in:
dwrz
2026-06-06 01:17:20 +00:00
parent 6fb63c8c90
commit ad58cd78ff
315 changed files with 56337 additions and 4 deletions

View File

@@ -0,0 +1,22 @@
package st1023
import (
"honnef.co/go/tools/analysis/lint"
"honnef.co/go/tools/internal/sharedcheck"
)
func init() {
SCAnalyzer.Analyzer.Name = "ST1023"
}
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{
Analyzer: sharedcheck.RedundantTypeInDeclarationChecker("should", false),
Doc: &lint.RawDocumentation{
Title: "Redundant type in variable declaration",
Since: "2021.1",
NonDefault: true,
MergeIf: lint.MergeIfAll,
},
})
var Analyzer = SCAnalyzer.Analyzer