File tree 1 file changed +0
-22
lines changed
1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -21,35 +21,13 @@ type Analyzer struct {
21
21
Analyzer * analysis.Analyzer
22
22
}
23
23
24
- func (a * Analyzer ) initialize () {
25
- a .Analyzer .Doc = a .Doc .String ()
26
- a .Analyzer .Requires = append (a .Analyzer .Requires , tokenfile .Analyzer )
27
- }
28
-
29
24
func InitializeAnalyzer (a * Analyzer ) * Analyzer {
30
25
a .Analyzer .Doc = a .Doc .String ()
31
26
a .Analyzer .URL = "https://staticcheck.dev/docs/checks/#" + a .Analyzer .Name
32
27
a .Analyzer .Requires = append (a .Analyzer .Requires , tokenfile .Analyzer )
33
28
return a
34
29
}
35
30
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
-
53
31
// Severity describes the severity of diagnostics reported by an analyzer.
54
32
type Severity int
55
33
You can’t perform that action at this time.
0 commit comments