Skip to content

Commit

Permalink
gopls: remove dead analysis code
Browse files Browse the repository at this point in the history
Change-Id: I1650a5b6b5a754438db2308e8e27da228bba939c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/459790
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
  • Loading branch information
findleyr authored and gopherbot committed Dec 30, 2022
1 parent 1a08d01 commit e417ea3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
8 changes: 0 additions & 8 deletions gopls/internal/lsp/cache/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -1130,14 +1130,6 @@ func (act *action) exec() (interface{}, *actionSummary, error) {
}, nil
}

func factType(fact analysis.Fact) reflect.Type {
t := reflect.TypeOf(fact)
if t.Kind() != reflect.Ptr {
panic(fmt.Sprintf("invalid Fact type: got %T, want pointer", fact))
}
return t
}

// requiredAnalyzers returns the transitive closure of required analyzers in preorder.
func requiredAnalyzers(analyzers []*analysis.Analyzer) []*analysis.Analyzer {
var result []*analysis.Analyzer
Expand Down
25 changes: 0 additions & 25 deletions gopls/internal/lsp/source/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -1394,31 +1394,6 @@ func (r *OptionResult) setStringSlice(s *[]string) {
}
}

// EnabledAnalyzers returns all of the analyzers enabled by the options.
func EnabledAnalyzers(options *Options) (analyzers []*Analyzer) {
for _, a := range options.DefaultAnalyzers {
if a.IsEnabled(options) {
analyzers = append(analyzers, a)
}
}
for _, a := range options.TypeErrorAnalyzers {
if a.IsEnabled(options) {
analyzers = append(analyzers, a)
}
}
for _, a := range options.ConvenienceAnalyzers {
if a.IsEnabled(options) {
analyzers = append(analyzers, a)
}
}
for _, a := range options.StaticcheckAnalyzers {
if a.IsEnabled(options) {
analyzers = append(analyzers, a)
}
}
return analyzers
}

func typeErrorAnalyzers() map[string]*Analyzer {
return map[string]*Analyzer{
fillreturns.Analyzer.Name: {
Expand Down

0 comments on commit e417ea3

Please sign in to comment.