Skip to content

Commit e417ea3

Browse files
findleyrgopherbot
authored andcommitted
gopls: remove dead analysis code
Change-Id: I1650a5b6b5a754438db2308e8e27da228bba939c Reviewed-on: https://go-review.googlesource.com/c/tools/+/459790 TryBot-Result: Gopher Robot <[email protected]> gopls-CI: kokoro <[email protected]> Auto-Submit: Robert Findley <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Run-TryBot: Robert Findley <[email protected]>
1 parent 1a08d01 commit e417ea3

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

gopls/internal/lsp/cache/analysis.go

-8
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@ func (act *action) exec() (interface{}, *actionSummary, error) {
11301130
}, nil
11311131
}
11321132

1133-
func factType(fact analysis.Fact) reflect.Type {
1134-
t := reflect.TypeOf(fact)
1135-
if t.Kind() != reflect.Ptr {
1136-
panic(fmt.Sprintf("invalid Fact type: got %T, want pointer", fact))
1137-
}
1138-
return t
1139-
}
1140-
11411133
// requiredAnalyzers returns the transitive closure of required analyzers in preorder.
11421134
func requiredAnalyzers(analyzers []*analysis.Analyzer) []*analysis.Analyzer {
11431135
var result []*analysis.Analyzer

gopls/internal/lsp/source/options.go

-25
Original file line numberDiff line numberDiff line change
@@ -1394,31 +1394,6 @@ func (r *OptionResult) setStringSlice(s *[]string) {
13941394
}
13951395
}
13961396

1397-
// EnabledAnalyzers returns all of the analyzers enabled by the options.
1398-
func EnabledAnalyzers(options *Options) (analyzers []*Analyzer) {
1399-
for _, a := range options.DefaultAnalyzers {
1400-
if a.IsEnabled(options) {
1401-
analyzers = append(analyzers, a)
1402-
}
1403-
}
1404-
for _, a := range options.TypeErrorAnalyzers {
1405-
if a.IsEnabled(options) {
1406-
analyzers = append(analyzers, a)
1407-
}
1408-
}
1409-
for _, a := range options.ConvenienceAnalyzers {
1410-
if a.IsEnabled(options) {
1411-
analyzers = append(analyzers, a)
1412-
}
1413-
}
1414-
for _, a := range options.StaticcheckAnalyzers {
1415-
if a.IsEnabled(options) {
1416-
analyzers = append(analyzers, a)
1417-
}
1418-
}
1419-
return analyzers
1420-
}
1421-
14221397
func typeErrorAnalyzers() map[string]*Analyzer {
14231398
return map[string]*Analyzer{
14241399
fillreturns.Analyzer.Name: {

0 commit comments

Comments
 (0)