Skip to content

Commit cc79ad0

Browse files
committed
analysis/lint: delete unused InitializeAnalyzers
1 parent 8f92ab7 commit cc79ad0

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

analysis/lint/lint.go

-22
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,13 @@ type Analyzer struct {
2121
Analyzer *analysis.Analyzer
2222
}
2323

24-
func (a *Analyzer) initialize() {
25-
a.Analyzer.Doc = a.Doc.String()
26-
a.Analyzer.Requires = append(a.Analyzer.Requires, tokenfile.Analyzer)
27-
}
28-
2924
func InitializeAnalyzer(a *Analyzer) *Analyzer {
3025
a.Analyzer.Doc = a.Doc.String()
3126
a.Analyzer.URL = "https://staticcheck.dev/docs/checks/#" + a.Analyzer.Name
3227
a.Analyzer.Requires = append(a.Analyzer.Requires, tokenfile.Analyzer)
3328
return a
3429
}
3530

36-
// InitializeAnalyzers takes a map of documentation and a map of go/analysis.Analyzers and returns a slice of Analyzers.
37-
// The map keys are the analyzer names.
38-
func InitializeAnalyzers(docs map[string]*Documentation, analyzers map[string]*analysis.Analyzer) []*Analyzer {
39-
out := make([]*Analyzer, 0, len(analyzers))
40-
for k, v := range analyzers {
41-
v.Name = k
42-
v.URL = "https://staticcheck.dev/docs/checks/#" + k
43-
a := &Analyzer{
44-
Doc: docs[k],
45-
Analyzer: v,
46-
}
47-
a.initialize()
48-
out = append(out, a)
49-
}
50-
return out
51-
}
52-
5331
// Severity describes the severity of diagnostics reported by an analyzer.
5432
type Severity int
5533

0 commit comments

Comments
 (0)