зеркало из https://github.com/golang/tools.git
gopls/internal/lsp/cmd: move to ../cmd
Also, move cmd/test/integration_test.go to ../ Change-Id: Ib439320718a47de1e5116dc043b6291ccb1b29ca Reviewed-on: https://go-review.googlesource.com/c/tools/+/541978 Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Родитель
a22ecf8c9a
Коммит
46fd9165b7
|
@ -27,7 +27,7 @@ Package | Description
|
|||
[gopls] | the main binary, plugins and integration tests
|
||||
[internal/lsp] | the core message handling package
|
||||
[internal/lsp/cache] | the cache layer
|
||||
[internal/lsp/cmd] | the gopls command line layer
|
||||
[internal/cmd] | the gopls command line layer
|
||||
[internal/lsp/debug] | features to aid in debugging gopls
|
||||
[internal/lsp/protocol] | the types of LSP request and response messages
|
||||
[internal/lsp/source] | the core feature implementations
|
||||
|
@ -39,7 +39,7 @@ Package | Description
|
|||
[internal/jsonrpc2]: https://github.com/golang/tools/tree/master/internal/jsonrpc2
|
||||
[internal/lsp]: https://github.com/golang/tools/tree/master/gopls/internal/lsp
|
||||
[internal/lsp/cache]: https://github.com/golang/tools/tree/master/gopls/internal/lsp/cache
|
||||
[internal/lsp/cmd]: https://github.com/golang/tools/tree/master/gopls/internal/lsp/cmd
|
||||
[internal/cmd]: https://github.com/golang/tools/tree/master/gopls/internal/cmd
|
||||
[internal/lsp/debug]: https://github.com/golang/tools/tree/master/gopls/internal/lsp/debug
|
||||
[internal/lsp/protocol]: https://github.com/golang/tools/tree/master/gopls/internal/lsp/protocol
|
||||
[internal/lsp/source]: https://github.com/golang/tools/tree/master/gopls/internal/lsp/source
|
||||
|
|
|
@ -25,7 +25,7 @@ func (c *check) DetailedHelp(f *flag.FlagSet) {
|
|||
fmt.Fprint(f.Output(), `
|
||||
Example: show the diagnostic results of this file:
|
||||
|
||||
$ gopls check internal/lsp/cmd/check.go
|
||||
$ gopls check internal/cmd/check.go
|
||||
`)
|
||||
printFlagDefaults(f)
|
||||
}
|
|
@ -49,8 +49,8 @@ func (d *definition) DetailedHelp(f *flag.FlagSet) {
|
|||
fmt.Fprintf(f.Output(), `
|
||||
Example: show the definition of the identifier at syntax at offset %[1]v in this file (flag.FlagSet):
|
||||
|
||||
$ gopls definition internal/lsp/cmd/definition.go:%[1]v:%[2]v
|
||||
$ gopls definition internal/lsp/cmd/definition.go:#%[3]v
|
||||
$ gopls definition internal/cmd/definition.go:%[1]v:%[2]v
|
||||
$ gopls definition internal/cmd/definition.go:#%[3]v
|
||||
|
||||
definition-flags:
|
||||
`, exampleLine, exampleColumn, exampleOffset)
|
|
@ -29,7 +29,7 @@ The arguments supplied may be simple file names, or ranges within files.
|
|||
|
||||
Example: reformat this file:
|
||||
|
||||
$ gopls format -w internal/lsp/cmd/check.go
|
||||
$ gopls format -w internal/cmd/check.go
|
||||
|
||||
format-flags:
|
||||
`)
|
|
@ -13,7 +13,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"golang.org/x/tools/gopls/internal/lsp/cmd"
|
||||
"golang.org/x/tools/gopls/internal/cmd"
|
||||
"golang.org/x/tools/internal/testenv"
|
||||
"golang.org/x/tools/internal/tool"
|
||||
)
|
|
@ -28,7 +28,7 @@ func (t *imports) DetailedHelp(f *flag.FlagSet) {
|
|||
fmt.Fprintf(f.Output(), `
|
||||
Example: update imports statements in a file:
|
||||
|
||||
$ gopls imports -w internal/lsp/cmd/check.go
|
||||
$ gopls imports -w internal/cmd/check.go
|
||||
|
||||
imports-flags:
|
||||
`)
|
|
@ -3,7 +3,7 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package cmdtest contains the test suite for the command line behavior of gopls.
|
||||
package cmdtest
|
||||
package cmd_test
|
||||
|
||||
// This file defines integration tests of each gopls subcommand that
|
||||
// fork+exec the command in a separate process.
|
||||
|
@ -39,8 +39,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"golang.org/x/tools/gopls/internal/bug"
|
||||
"golang.org/x/tools/gopls/internal/cmd"
|
||||
"golang.org/x/tools/gopls/internal/hooks"
|
||||
"golang.org/x/tools/gopls/internal/lsp/cmd"
|
||||
"golang.org/x/tools/gopls/internal/lsp/debug"
|
||||
"golang.org/x/tools/gopls/internal/lsp/protocol"
|
||||
"golang.org/x/tools/internal/testenv"
|
|
@ -31,7 +31,7 @@ func (l *links) DetailedHelp(f *flag.FlagSet) {
|
|||
fmt.Fprintf(f.Output(), `
|
||||
Example: list links contained within a file:
|
||||
|
||||
$ gopls links internal/lsp/cmd/check.go
|
||||
$ gopls links internal/cmd/check.go
|
||||
|
||||
links-flags:
|
||||
`)
|
|
@ -57,7 +57,7 @@ func (c *semtok) DetailedHelp(f *flag.FlagSet) {
|
|||
fmt.Fprint(f.Output(), `
|
||||
Example: show the semantic tokens for this file:
|
||||
|
||||
$ gopls semtok internal/lsp/cmd/semtok.go
|
||||
$ gopls semtok internal/cmd/semtok.go
|
||||
`)
|
||||
printFlagDefaults(f)
|
||||
}
|
|
@ -35,7 +35,7 @@ func (s *suggestedFix) DetailedHelp(f *flag.FlagSet) {
|
|||
fmt.Fprintf(f.Output(), `
|
||||
Example: apply fixes to this file, rewriting it:
|
||||
|
||||
$ gopls fix -a -w internal/lsp/cmd/check.go
|
||||
$ gopls fix -a -w internal/cmd/check.go
|
||||
|
||||
The -a (-all) flag causes all fixes, not just preferred ones, to be
|
||||
applied, but since no fixes are currently preferred, this flag is
|
||||
|
@ -59,7 +59,7 @@ enumerate all kinds.
|
|||
Example: apply any "refactor.rewrite" fixes at the specific byte
|
||||
offset within this file:
|
||||
|
||||
$ gopls fix -a internal/lsp/cmd/check.go:#43 refactor.rewrite
|
||||
$ gopls fix -a internal/cmd/check.go:#43 refactor.rewrite
|
||||
|
||||
fix-flags:
|
||||
`)
|
|
@ -5,4 +5,4 @@ Usage:
|
|||
|
||||
Example: show the diagnostic results of this file:
|
||||
|
||||
$ gopls check internal/lsp/cmd/check.go
|
||||
$ gopls check internal/cmd/check.go
|
|
@ -5,8 +5,8 @@ Usage:
|
|||
|
||||
Example: show the definition of the identifier at syntax at offset 44 in this file (flag.FlagSet):
|
||||
|
||||
$ gopls definition internal/lsp/cmd/definition.go:44:47
|
||||
$ gopls definition internal/lsp/cmd/definition.go:#1270
|
||||
$ gopls definition internal/cmd/definition.go:44:47
|
||||
$ gopls definition internal/cmd/definition.go:#1270
|
||||
|
||||
definition-flags:
|
||||
-json
|
|
@ -5,7 +5,7 @@ Usage:
|
|||
|
||||
Example: apply fixes to this file, rewriting it:
|
||||
|
||||
$ gopls fix -a -w internal/lsp/cmd/check.go
|
||||
$ gopls fix -a -w internal/cmd/check.go
|
||||
|
||||
The -a (-all) flag causes all fixes, not just preferred ones, to be
|
||||
applied, but since no fixes are currently preferred, this flag is
|
||||
|
@ -29,7 +29,7 @@ enumerate all kinds.
|
|||
Example: apply any "refactor.rewrite" fixes at the specific byte
|
||||
offset within this file:
|
||||
|
||||
$ gopls fix -a internal/lsp/cmd/check.go:#43 refactor.rewrite
|
||||
$ gopls fix -a internal/cmd/check.go:#43 refactor.rewrite
|
||||
|
||||
fix-flags:
|
||||
-a,-all
|
|
@ -7,7 +7,7 @@ The arguments supplied may be simple file names, or ranges within files.
|
|||
|
||||
Example: reformat this file:
|
||||
|
||||
$ gopls format -w internal/lsp/cmd/check.go
|
||||
$ gopls format -w internal/cmd/check.go
|
||||
|
||||
format-flags:
|
||||
-d,-diff
|
|
@ -5,7 +5,7 @@ Usage:
|
|||
|
||||
Example: update imports statements in a file:
|
||||
|
||||
$ gopls imports -w internal/lsp/cmd/check.go
|
||||
$ gopls imports -w internal/cmd/check.go
|
||||
|
||||
imports-flags:
|
||||
-d,-diff
|
|
@ -5,7 +5,7 @@ Usage:
|
|||
|
||||
Example: list links contained within a file:
|
||||
|
||||
$ gopls links internal/lsp/cmd/check.go
|
||||
$ gopls links internal/cmd/check.go
|
||||
|
||||
links-flags:
|
||||
-json
|
|
@ -5,4 +5,4 @@ Usage:
|
|||
|
||||
Example: show the semantic tokens for this file:
|
||||
|
||||
$ gopls semtok internal/lsp/cmd/semtok.go
|
||||
$ gopls semtok internal/cmd/semtok.go
|
|
@ -926,7 +926,7 @@ func (c *commandHandler) StopProfile(ctx context.Context, args command.StopProfi
|
|||
return result, nil
|
||||
}
|
||||
|
||||
// Copy of pkgLoadConfig defined in internal/lsp/cmd/vulncheck.go
|
||||
// Copy of pkgLoadConfig defined in internal/cmd/vulncheck.go
|
||||
// TODO(hyangah): decide where to define this.
|
||||
type pkgLoadConfig struct {
|
||||
// BuildFlags is a list of command-line flags to be passed through to
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"golang.org/x/tools/gopls/internal/lsp/cmd"
|
||||
"golang.org/x/tools/gopls/internal/cmd"
|
||||
"golang.org/x/tools/gopls/internal/lsp/source"
|
||||
"golang.org/x/tools/internal/gocommand"
|
||||
"golang.org/x/tools/internal/memoize"
|
||||
|
|
|
@ -21,8 +21,8 @@ import (
|
|||
"time"
|
||||
|
||||
"golang.org/x/tools/gopls/internal/bug"
|
||||
"golang.org/x/tools/gopls/internal/cmd"
|
||||
"golang.org/x/tools/gopls/internal/hooks"
|
||||
"golang.org/x/tools/gopls/internal/lsp/cmd"
|
||||
"golang.org/x/tools/gopls/internal/lsp/command"
|
||||
"golang.org/x/tools/gopls/internal/lsp/fake"
|
||||
"golang.org/x/tools/gopls/internal/lsp/regtest"
|
||||
|
|
|
@ -17,8 +17,8 @@ import (
|
|||
"context"
|
||||
"os"
|
||||
|
||||
"golang.org/x/tools/gopls/internal/cmd"
|
||||
"golang.org/x/tools/gopls/internal/hooks"
|
||||
"golang.org/x/tools/gopls/internal/lsp/cmd"
|
||||
"golang.org/x/tools/gopls/internal/telemetry"
|
||||
"golang.org/x/tools/internal/tool"
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче