Skip to content

Commit f30e3d1

Browse files
cuishuanggopherbot
authored andcommitted
all: fix some minor issues in comments
Change-Id: I662505f503cc3e4a2e3fdd0f13b6596fd7388e56 Reviewed-on: https://go-review.googlesource.com/c/tools/+/688675 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
1 parent 74b5d36 commit f30e3d1

File tree

20 files changed

+22
-22
lines changed

20 files changed

+22
-22
lines changed

go/analysis/analysistest/analysistest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ func check(t Testing, gopath string, act *checker.Action) {
575575
files := act.Package.OtherFiles
576576

577577
// Hack: these two analyzers need to extract expectations from
578-
// all configurations, so include the files are are usually
578+
// all configurations, so include the files are usually
579579
// ignored. (This was previously a hack in the respective
580580
// analyzers' tests.)
581581
if act.Analyzer.Name == "buildtag" || act.Analyzer.Name == "directive" {

go/ast/astutil/enclosing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Nod
113113
// childrenOf elides the FuncType node beneath FuncDecl.
114114
// Add it back here for TypeParams, Params, Results,
115115
// all FieldLists). But we don't add it back for the "func" token
116-
// even though it is is the tree at FuncDecl.Type.Func.
116+
// even though it is the tree at FuncDecl.Type.Func.
117117
if decl, ok := node.(*ast.FuncDecl); ok {
118118
if fields, ok := child.(*ast.FieldList); ok && fields != decl.Recv {
119119
path = append(path, decl.Type)

go/ssa/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ type builder struct {
138138
finished int // finished is the length of the prefix of fns containing built functions.
139139

140140
// The task of building shared functions within the builder.
141-
// Shared functions are ones the the builder may either create or lookup.
141+
// Shared functions are ones the builder may either create or lookup.
142142
// These may be built by other builders in parallel.
143143
// The task is done when the builder has finished iterating, and it
144144
// waits for all shared functions to finish building.

go/types/typeutil/map_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func Fb1[P any](x *P) {
214214
func Fb2[Q any](x *Q) {
215215
}
216216
217-
// G1 and G2 are mutally recursive, and have identical methods.
217+
// G1 and G2 are mutually recursive, and have identical methods.
218218
type G1[P any] struct{
219219
Field *G2[P]
220220
}

gopls/doc/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ ensure that Gopls is updated when a new stable version is released.
6767

6868
After updating, you may need to restart running Gopls processes to
6969
observe the effect. Each client has its own way to restart the server.
70-
(On a UNIX machine, you can use the commmand `killall gopls`.)
70+
(On a UNIX machine, you can use the command `killall gopls`.)
7171

7272
Learn more in the
7373
[advanced installation instructions](advanced.md#installing-unreleased-versions).

gopls/internal/analysis/unusedfunc/unusedfunc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import (
5252
//
5353
// Types (sans methods), constants, and vars are more straightforward.
5454
// For now we ignore enums (const decls using iota) since it is
55-
// commmon for at least some values to be unused when they are added
55+
// common for at least some values to be unused when they are added
5656
// for symmetry, future use, or to conform to some external pattern.
5757

5858
//go:embed doc.go

gopls/internal/cache/analysis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ func (act *action) exec(ctx context.Context) (any, *actionSummary, error) {
10641064
// Read file from snapshot, to ensure reads are consistent.
10651065
//
10661066
// TODO(adonovan): make the dependency analysis sound by
1067-
// incorporating these additional files into the the analysis
1067+
// incorporating these additional files into the analysis
10681068
// hash. This requires either (a) preemptively reading and
10691069
// hashing a potentially large number of mostly irrelevant
10701070
// files; or (b) some kind of dynamic dependency discovery

gopls/internal/cache/mod.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ func ResolvedVersion(module *packages.Module) string {
509509
return module.Version
510510
}
511511

512-
// ResolvedPath returns the the module path, which considers replace directive.
512+
// ResolvedPath returns the module path, which considers replace directive.
513513
func ResolvedPath(module *packages.Module) string {
514514
if module.Replace != nil {
515515
return module.Replace.Path

gopls/internal/golang/completion/completion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,7 +2589,7 @@ func inferExpectedResultTypes(c *completer, callNodeIdx int) []types.Type {
25892589
var expectedResults []types.Type
25902590

25912591
// Check the parents of the call node to extract the expected result types of the call signature.
2592-
// Currently reverse inferences are only supported with the the following parent expressions,
2592+
// Currently reverse inferences are only supported with the following parent expressions,
25932593
// however this list isn't exhaustive.
25942594
switch node := c.path[callNodeIdx+1].(type) {
25952595
case *ast.KeyValueExpr:
@@ -2671,7 +2671,7 @@ func expectedValueSpecType(pkg *cache.Package, node *ast.ValueSpec, pos token.Po
26712671
}
26722672

26732673
// expectedAssignStmtTypes analyzes the provided assignStmt, and checks
2674-
// to see if the provided pos is within a RHS expresison. If so, it report
2674+
// to see if the provided pos is within a RHS expression. If so, it report
26752675
// the expected type of that expression, and the LHS type(s) to which it
26762676
// is being assigned.
26772677
func expectedAssignStmtTypes(pkg *cache.Package, node *ast.AssignStmt, pos token.Pos) (objType types.Type, assignees []types.Type) {

gopls/internal/golang/implementation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func implementsObj(info *types.Info, file *ast.File, pos token.Pos) (types.Objec
372372
// a function body. The global search index excludes such types
373373
// because reliably naming such types is hard.)
374374
//
375-
// Results are reported via the the yield function.
375+
// Results are reported via the yield function.
376376
func localImplementations(ctx context.Context, snapshot *cache.Snapshot, pkg *cache.Package, id *ast.Ident, rel methodsets.TypeRelation, yield implYieldFunc) error {
377377
queryType, queryMethod := typeOrMethod(pkg.TypesInfo().Defs[id])
378378
if queryType == nil {

0 commit comments

Comments
 (0)