mirror of https://github.com/golang/go.git
internal/lsp: remove dead code
Running `staticcheck ./internal/lsp/...` turned up a few instances of dead code. Remove them. Change-Id: Ic53db59cd0959fad960b086158eb550a624a4d91 Reviewed-on: https://go-review.googlesource.com/c/tools/+/268580 Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Robert Findley <rfindley@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
parent
092357f697
commit
7099162a90
|
|
@ -308,11 +308,6 @@ func isGoMod(uri span.URI) bool {
|
|||
return filepath.Base(uri.Filename()) == "go.mod"
|
||||
}
|
||||
|
||||
// isGoMod reports if uri is a go.sum file.
|
||||
func isGoSum(uri span.URI) bool {
|
||||
return filepath.Base(uri.Filename()) == "go.sum"
|
||||
}
|
||||
|
||||
// fileExists reports if the file uri exists within source.
|
||||
func fileExists(ctx context.Context, uri span.URI, source source.FileSource) (bool, error) {
|
||||
fh, err := source.GetFile(ctx, uri)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import (
|
|||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"golang.org/x/tools/internal/event"
|
||||
|
|
@ -409,11 +408,6 @@ func (s *Server) registerWatchedDirectoriesLocked(ctx context.Context, dirs map[
|
|||
return nil
|
||||
}
|
||||
|
||||
func isSubdirectory(root, leaf string) bool {
|
||||
rel, err := filepath.Rel(root, leaf)
|
||||
return err == nil && !strings.HasPrefix(rel, "..")
|
||||
}
|
||||
|
||||
func (s *Server) fetchConfig(ctx context.Context, name string, folder span.URI, o *source.Options) error {
|
||||
if !s.session.Options().ConfigurationSupported {
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -126,8 +126,6 @@ const (
|
|||
tokOperator tokenType = "operator"
|
||||
)
|
||||
|
||||
var lastPosition token.Position
|
||||
|
||||
func (e *encoded) token(start token.Pos, leng int, typ tokenType, mods []string) {
|
||||
if start == 0 {
|
||||
e.unexpected("token at token.NoPos")
|
||||
|
|
|
|||
Loading…
Reference in New Issue