diff --git a/cmd/file2fuzz/main.go b/cmd/file2fuzz/main.go index f0c8939ad0..350ed0af6b 100644 --- a/cmd/file2fuzz/main.go +++ b/cmd/file2fuzz/main.go @@ -9,7 +9,7 @@ // // file2fuzz [-o output] [input...] // -// The defualt behavior is to read input from stdin and write the converted +// The default behavior is to read input from stdin and write the converted // output to stdout. If any position arguments are provided stdin is ignored // and the arguments are assumed to be input files to convert. // diff --git a/go/analysis/doc/suggested_fixes.md b/go/analysis/doc/suggested_fixes.md index f46871ab86..74888f8a96 100644 --- a/go/analysis/doc/suggested_fixes.md +++ b/go/analysis/doc/suggested_fixes.md @@ -93,7 +93,7 @@ Singlechecker and multichecker have the ```-fix``` flag, which will automaticall apply all fixes suggested by their analysis or analyses. This is intended to be used primarily by refactoring tools, because in general, like diagnostics, suggested fixes will need to be examined by a human who can decide whether -they are relevent. +they are relevant. ### gopls diff --git a/go/analysis/passes/nilness/nilness.go b/go/analysis/passes/nilness/nilness.go index 2eb782b427..8fd8cd0008 100644 --- a/go/analysis/passes/nilness/nilness.go +++ b/go/analysis/passes/nilness/nilness.go @@ -342,7 +342,7 @@ func eq(b *ssa.BasicBlock) (op *ssa.BinOp, tsucc, fsucc *ssa.BasicBlock) { // ChangeInterface, have transitive nilness, such that if you know the // underlying value is nil, you also know the value itself is nil, and vice // versa. This operation allows callers to match on any of the related values -// in analyses, rather than just the one form of the value that happend to +// in analyses, rather than just the one form of the value that happened to // appear in a comparison. // // This work must be in addition to unwrapping values within nilnessOf because diff --git a/go/analysis/passes/structtag/testdata/src/a/a.go b/go/analysis/passes/structtag/testdata/src/a/a.go index 8b1cea16b2..f9b035a7bc 100644 --- a/go/analysis/passes/structtag/testdata/src/a/a.go +++ b/go/analysis/passes/structtag/testdata/src/a/a.go @@ -124,7 +124,7 @@ type UnexpectedSpacetest struct { Q int `foo:" doesn't care "` } -// Nested fiels can be shadowed by fields further up. For example, +// Nested fields can be shadowed by fields further up. For example, // ShadowingAnonJSON replaces the json:"a" field in AnonymousJSONField. // However, if the two conflicting fields appear at the same level like in // DuplicateWithAnotherPackage, we should error. diff --git a/go/callgraph/vta/graph.go b/go/callgraph/vta/graph.go index d734d1bb6d..ad7ef0e88e 100644 --- a/go/callgraph/vta/graph.go +++ b/go/callgraph/vta/graph.go @@ -640,7 +640,7 @@ func addReturnFlows(b *builder, r *ssa.Return, site ssa.Value) { // addInFlowEdge adds s -> d to g if d is node that can have an inflow, i.e., a node // that represents an interface or an unresolved function value. Otherwise, there -// is no interesting type flow so the edge is ommited. +// is no interesting type flow so the edge is omitted. func (b *builder) addInFlowEdge(s, d node) { if hasInFlow(d) { b.graph.addEdge(b.representative(s), b.representative(d)) diff --git a/go/callgraph/vta/testdata/src/node_uniqueness.go b/go/callgraph/vta/testdata/src/node_uniqueness.go index 0c1dc074f3..fd48405f37 100644 --- a/go/callgraph/vta/testdata/src/node_uniqueness.go +++ b/go/callgraph/vta/testdata/src/node_uniqueness.go @@ -49,8 +49,8 @@ func Baz(a *A) (I, I, interface{}, interface{}) { // Without canon approach, one of Pointer(*A) -> Local(t0) and Pointer(*A) -> Local(t2) edges is // missing in the graph string representation. The original graph has both of the edges but the -// source node Pointer(*A) is not the same; two occurences of Pointer(*A) are considered separate -// nodes. Since they have the same string representation, one edge gets overriden by the other +// source node Pointer(*A) is not the same; two occurrences of Pointer(*A) are considered separate +// nodes. Since they have the same string representation, one edge gets overridden by the other // during the graph stringification, instead of being joined together as in below. // WANT: diff --git a/go/callgraph/vta/utils.go b/go/callgraph/vta/utils.go index 9633b8680b..e7a97e2d84 100644 --- a/go/callgraph/vta/utils.go +++ b/go/callgraph/vta/utils.go @@ -61,7 +61,7 @@ func hasInFlow(n node) bool { // hasInitialTypes check if a node can have initial types. // Returns true iff `n` is not a panic or recover node as -// those are artifical. +// those are artificial. func hasInitialTypes(n node) bool { switch n.(type) { case panicArg, recoverReturn: diff --git a/go/callgraph/vta/vta.go b/go/callgraph/vta/vta.go index 95fe29bf25..98fabe58c2 100644 --- a/go/callgraph/vta/vta.go +++ b/go/callgraph/vta/vta.go @@ -133,7 +133,7 @@ func resolve(c ssa.CallInstruction, types propTypeMap, cache methodCache) []*ssa } // propFunc returns the functions modeled with the propagation type `p` -// assigned to call site `c`. If no such funciton exists, nil is returned. +// assigned to call site `c`. If no such function exists, nil is returned. func propFunc(p propType, c ssa.CallInstruction, cache methodCache) []*ssa.Function { if p.f != nil { return []*ssa.Function{p.f} diff --git a/gopls/doc/settings.md b/gopls/doc/settings.md index c250d236aa..092a3c7cfa 100644 --- a/gopls/doc/settings.md +++ b/gopls/doc/settings.md @@ -254,7 +254,7 @@ Default: `"Fuzzy"`. **This setting is experimental and may be deleted.** -experimentalPostfixCompletions enables artifical method snippets +experimentalPostfixCompletions enables artificial method snippets such as "someSlice.sort!". Default: `true`. diff --git a/internal/jsonrpc2_v2/conn.go b/internal/jsonrpc2_v2/conn.go index d60b6c5521..018175e885 100644 --- a/internal/jsonrpc2_v2/conn.go +++ b/internal/jsonrpc2_v2/conn.go @@ -347,7 +347,7 @@ func (c *Connection) incomingResponse(msg *Response) { } } -// manageQueue reads incoming requests, attempts to proccess them with the preempter, or queue them +// manageQueue reads incoming requests, attempts to process them with the preempter, or queue them // up for normal handling. func (c *Connection) manageQueue(ctx context.Context, preempter Preempter, fromRead <-chan *incoming, toDeliver chan<- *incoming) { defer close(toDeliver) diff --git a/internal/jsonrpc2_v2/net.go b/internal/jsonrpc2_v2/net.go index 0b413d8913..4f20825999 100644 --- a/internal/jsonrpc2_v2/net.go +++ b/internal/jsonrpc2_v2/net.go @@ -21,7 +21,7 @@ type NetListenOptions struct { NetDialer net.Dialer } -// NetListener returns a new Listener that listents on a socket using the net package. +// NetListener returns a new Listener that listens on a socket using the net package. func NetListener(ctx context.Context, network, address string, options NetListenOptions) (Listener, error) { ln, err := options.NetListenConfig.Listen(ctx, network, address) if err != nil { @@ -83,7 +83,7 @@ func (n *netDialer) Dial(ctx context.Context) (io.ReadWriteCloser, error) { // NetPipeListener returns a new Listener that listens using net.Pipe. // It is only possibly to connect to it using the Dialier returned by the // Dialer method, each call to that method will generate a new pipe the other -// side of which will be returnd from the Accept call. +// side of which will be returned from the Accept call. func NetPipeListener(ctx context.Context) (Listener, error) { return &netPiper{ done: make(chan struct{}), diff --git a/internal/lsp/command/commandmeta/meta.go b/internal/lsp/command/commandmeta/meta.go index 1a6a2c7253..102b898397 100644 --- a/internal/lsp/command/commandmeta/meta.go +++ b/internal/lsp/command/commandmeta/meta.go @@ -148,7 +148,7 @@ func (l *fieldLoader) loadField(pkg *packages.Package, obj *types.Var, doc, tag JSONTag: reflect.StructTag(tag).Get("json"), } under := fld.Type.Underlying() - // Quick-and-dirty handling for various underyling types. + // Quick-and-dirty handling for various underlying types. switch p := under.(type) { case *types.Pointer: under = p.Elem().Underlying() diff --git a/internal/lsp/semantic.go b/internal/lsp/semantic.go index eead3d24d8..7c0419c20e 100644 --- a/internal/lsp/semantic.go +++ b/internal/lsp/semantic.go @@ -378,7 +378,7 @@ func (e *encoded) inspector(n ast.Node) bool { case *ast.IncDecStmt: e.token(x.TokPos, len(x.Tok.String()), tokOperator, nil) case *ast.IndexExpr: - case *typeparams.IndexListExpr: // accomodate generics + case *typeparams.IndexListExpr: // accommodate generics case *ast.InterfaceType: e.token(x.Interface, len("interface"), tokKeyword, nil) case *ast.KeyValueExpr: diff --git a/internal/lsp/source/api_json.go b/internal/lsp/source/api_json.go index 1db1700234..f2aff107da 100755 --- a/internal/lsp/source/api_json.go +++ b/internal/lsp/source/api_json.go @@ -158,7 +158,7 @@ var GeneratedAPIJSON = &APIJSON{ { Name: "experimentalPostfixCompletions", Type: "bool", - Doc: "experimentalPostfixCompletions enables artifical method snippets\nsuch as \"someSlice.sort!\".\n", + Doc: "experimentalPostfixCompletions enables artificial method snippets\nsuch as \"someSlice.sort!\".\n", Default: "true", Status: "experimental", Hierarchy: "ui.completion", diff --git a/internal/lsp/source/options.go b/internal/lsp/source/options.go index 9688d8c7e0..8e262c63b2 100644 --- a/internal/lsp/source/options.go +++ b/internal/lsp/source/options.go @@ -329,7 +329,7 @@ type CompletionOptions struct { // candidates. Matcher Matcher `status:"advanced"` - // ExperimentalPostfixCompletions enables artifical method snippets + // ExperimentalPostfixCompletions enables artificial method snippets // such as "someSlice.sort!". ExperimentalPostfixCompletions bool `status:"experimental"` } diff --git a/internal/lsp/template/symbols.go b/internal/lsp/template/symbols.go index 5203f4c559..ce5a1e799b 100644 --- a/internal/lsp/template/symbols.go +++ b/internal/lsp/template/symbols.go @@ -191,8 +191,8 @@ func (p *Parsed) findSymbols() { pop() } -// DocumentSymbols returns a heirarchy of the symbols defined in a template file. -// (The heirarchy is flat. SymbolInformation might be better.) +// DocumentSymbols returns a hierarchy of the symbols defined in a template file. +// (The hierarchy is flat. SymbolInformation might be better.) func DocumentSymbols(snapshot source.Snapshot, fh source.FileHandle) ([]protocol.DocumentSymbol, error) { buf, err := fh.Read() if err != nil { diff --git a/internal/lsp/testdata/stub/stub_ignored_imports.go b/internal/lsp/testdata/stub/stub_ignored_imports.go index f0abcc5345..8f6ec73de1 100644 --- a/internal/lsp/testdata/stub/stub_ignored_imports.go +++ b/internal/lsp/testdata/stub/stub_ignored_imports.go @@ -8,7 +8,7 @@ import ( // This file tests that dot-imports and underscore imports // are properly ignored and that a new import is added to -// refernece method types +// reference method types var ( _ Reader diff --git a/internal/lsp/testdata/stub/stub_ignored_imports.go.golden b/internal/lsp/testdata/stub/stub_ignored_imports.go.golden index 4f34d79916..a0ddc17935 100644 --- a/internal/lsp/testdata/stub/stub_ignored_imports.go.golden +++ b/internal/lsp/testdata/stub/stub_ignored_imports.go.golden @@ -10,7 +10,7 @@ import ( // This file tests that dot-imports and underscore imports // are properly ignored and that a new import is added to -// refernece method types +// reference method types var ( _ Reader