mirror of https://github.com/golang/go.git
tools: fix some typos
Change-Id: Iaad847631b9d5ee40558fcf9d51f4dfa99600e6b GitHub-Last-Rev: 6fcb64f8d9a093e7bd949e5d28bd1176c27005c0 GitHub-Pull-Request: golang/tools#372 Reviewed-on: https://go-review.googlesource.com/c/tools/+/389595 Run-TryBot: Ian Lance Taylor <iant@golang.org> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
f23240f570
commit
78ff15e680
|
|
@ -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.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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`.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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{}),
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue