зеркало из https://github.com/golang/tools.git
all: remove many cases of space-space
Change-Id: I49eb8410d4143c67dfccf027f8b2794e66963415 Reviewed-on: https://go-review.googlesource.com/c/tools/+/212580 Reviewed-by: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Родитель
2912ce79fc
Коммит
6c68fec0bc
|
@ -68,7 +68,7 @@ type Note struct {
|
|||
Args []interface{} // the arguments for the note
|
||||
}
|
||||
|
||||
// ReadFile is the type of a function that can provide file contents for a
|
||||
// ReadFile is the type of a function that can provide file contents for a
|
||||
// given filename.
|
||||
// This is used in MatchBefore to look up the content of the file in order to
|
||||
// find the line to match the pattern against.
|
||||
|
|
|
@ -160,7 +160,7 @@ type Config struct {
|
|||
Tests bool
|
||||
|
||||
// Overlay provides a mapping of absolute file paths to file contents.
|
||||
// If the file with the given path already exists, the parser will use the
|
||||
// If the file with the given path already exists, the parser will use the
|
||||
// alternative file contents provided by the map.
|
||||
//
|
||||
// Overlays provide incomplete support for when a given file doesn't
|
||||
|
|
|
@ -1194,7 +1194,7 @@ func (b *builder) compLit(fn *Function, addr Value, e *ast.CompositeLit, isZero
|
|||
for _, e := range e.Elts {
|
||||
e := e.(*ast.KeyValueExpr)
|
||||
|
||||
// If a key expression in a map literal is itself a
|
||||
// If a key expression in a map literal is itself a
|
||||
// composite literal, the type may be omitted.
|
||||
// For example:
|
||||
// map[*struct{}]bool{{}: true}
|
||||
|
|
|
@ -32,7 +32,7 @@ func (e *emptyVFS) Open(path string) (ReadSeekCloser, error) {
|
|||
return nil, os.ErrNotExist
|
||||
}
|
||||
|
||||
// Stat returns os.FileInfo for an empty directory if the path is
|
||||
// Stat returns os.FileInfo for an empty directory if the path is
|
||||
// is root "/" or error. os.FileInfo is implemented by emptyVFS
|
||||
func (e *emptyVFS) Stat(path string) (os.FileInfo, error) {
|
||||
if path == "/" {
|
||||
|
|
|
@ -28,7 +28,7 @@ const debugNS = false
|
|||
// mount point and have the system behave as if the union of those
|
||||
// file systems were present at the mount point.
|
||||
// For example, if the OS file system has a Go installation in
|
||||
// c:\Go and additional Go path trees in d:\Work1 and d:\Work2, then
|
||||
// c:\Go and additional Go path trees in d:\Work1 and d:\Work2, then
|
||||
// this name space creates the view we want for the godoc server:
|
||||
//
|
||||
// NameSpace{
|
||||
|
|
|
@ -177,7 +177,7 @@ There are some fundamental architecture decisions that affect much of the rest o
|
|||
|
||||
### Process lifetime: *managed by the editor*
|
||||
|
||||
Processing a large code base to fully type check and then analyze it within the latency requirements is not feasible, and is one of the primary problems with the existing solutions. This remains true even if the computed information was cached on disk, as running analyzers and type checkers ends up requiring the full AST of all files in the dependency graph.
|
||||
Processing a large code base to fully type check and then analyze it within the latency requirements is not feasible, and is one of the primary problems with the existing solutions. This remains true even if the computed information was cached on disk, as running analyzers and type checkers ends up requiring the full AST of all files in the dependency graph.
|
||||
It is theoretically possible to do better, but only with a major re-write of the existing parsing and type checking libraries, something that is not feasible at this time.
|
||||
|
||||
This implies that gopls should be a long running process, that is able to cache and pre-calculate results in memory so that when a request arrives it can produce the answer much faster.
|
||||
|
@ -301,7 +301,7 @@ Previous | [guru]
|
|||
These features suggest or apply edits to the code for the user, including refactoring features, for which there are many potential use cases.
|
||||
Refactoring is one of the places where Go tools could potentially be very strong, but have not been so far, and thus there is huge potential for improvements in the developer experience.
|
||||
There is not yet a clear understanding of the kinds of refactoring people need or how they should express them however, and there are weaknesses in the LSP protocol around this.
|
||||
This means it may be much more of a research project.
|
||||
This means it may be much more of a research project.
|
||||
|
||||
|
||||
---
|
||||
|
|
|
@ -327,7 +327,7 @@ func importSpec(s Snapshot, pkg Package, file *ast.File, pos token.Pos) (*Identi
|
|||
}
|
||||
|
||||
// typeSwitchVar handles the special case of a local variable implicitly defined in a type switch.
|
||||
// In such cases, the definition of the implicit variable will not be recorded in the *types.Info.Defs map,
|
||||
// In such cases, the definition of the implicit variable will not be recorded in the *types.Info.Defs map,
|
||||
// but rather in the *types.Info.Implicits map.
|
||||
func typeSwitchVar(info *types.Info, path []ast.Node) []types.Object {
|
||||
if len(path) < 3 {
|
||||
|
|
|
@ -157,7 +157,7 @@ func main() { // HLfunc
|
|||
err: "main.go:0: no match for function main",
|
||||
},
|
||||
{
|
||||
name: "all code with numbers",
|
||||
name: "all code with numbers",
|
||||
readFile: read(helloTest, nil),
|
||||
sourceFile: "main.go",
|
||||
cmd: ".code -numbers main.go",
|
||||
|
|
Загрузка…
Ссылка в новой задаче