Skip to content

Commit 21df14b

Browse files
alexandeardominikh
authored andcommitted
all: fix typos in comments; remove dupwords
1 parent cdd14ab commit 21df14b

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

analysis/code/code.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func CallName(pass *analysis.Pass, call *ast.CallExpr) string {
178178
fun = idx.X
179179
}
180180

181-
// (foo)[T] is not a valid instantiationg, so no need to unparen again.
181+
// (foo)[T] is not a valid instantiation, so no need to unparen again.
182182

183183
switch fun := fun.(type) {
184184
case *ast.SelectorExpr:
@@ -525,7 +525,7 @@ func StdlibVersion(pass *analysis.Pass, node Positioner) string {
525525
// Do note that strictly speaking we're conflating the Go version and the
526526
// module version in our check. Nothing is stopping a user from using Go 1.17
527527
// (which didn't implement the new rules for versions in go.mod) to build a Go
528-
// 1.22 module, in which case a file tagged with go1.17 will not have acces to the 1.22
528+
// 1.22 module, in which case a file tagged with go1.17 will not have access to the 1.22
529529
// standard library. However, we believe that if a module requires 1.21 or
530530
// newer, then the author clearly expects the new behavior, and doesn't care
531531
// for the old one. Otherwise they would've specified an older version.

go/ir/builder.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ func (b *builder) stmtList(fn *Function, list []ast.Stmt) {
895895
// returns the effective receiver after applying the implicit field
896896
// selections of sel.
897897
//
898-
// wantAddr requests that the result is an an address. If
898+
// wantAddr requests that the result is an address. If
899899
// !sel.Indirect(), this may require that e be built in addr() mode; it
900900
// must thus be addressable.
901901
//
@@ -2058,7 +2058,7 @@ func (b *builder) forStmtGo122(fn *Function, s *ast.ForStmt, label *lblock) {
20582058
fn.emit(phi, lhs)
20592059

20602060
fn.currentBlock = post
2061-
// If next is is local, it reuses the address and zeroes the old value so
2061+
// If next is local, it reuses the address and zeroes the old value so
20622062
// load before allocating next.
20632063
load := emitLoad(fn, phi, init)
20642064
next := emitLocal(fn, v.Type(), lhs, v.Name())
@@ -3153,7 +3153,7 @@ func (b *builder) buildFunction(fn *Function) {
31533153
func (b *builder) buildYieldFunc(fn *Function) {
31543154
// See builder.rangeFunc for detailed documentation on how fn is set up.
31553155
//
3156-
// In psuedo-Go this roughly builds:
3156+
// In pseudo-Go this roughly builds:
31573157
// func yield(_k tk, _v tv) bool {
31583158
// if jump != READY { panic("yield function called after range loop exit") }
31593159
// jump = BUSY

go/ir/emit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func emitArith(f *Function, op token.Token, x, y Value, t types.Type, source ast
156156
}
157157

158158
// emitCompare emits to f code compute the boolean result of
159-
// comparison comparison 'x op y'.
159+
// comparison 'x op y'.
160160
func emitCompare(f *Function, op token.Token, x, y Value, source ast.Node) Value {
161161
xt := x.Type().Underlying()
162162
yt := y.Type().Underlying()

go/ir/source_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func TestObjValueLookup(t *testing.T) {
5454

5555
// Each note of the form @ir(x, "BinOp") in testdata/objlookup.go
5656
// specifies an expectation that an object named x declared on the
57-
// same line is associated with an an ir.Value of type *ir.BinOp.
57+
// same line is associated with an ir.Value of type *ir.BinOp.
5858
notes, err := expect.ExtractGo(conf.Fset, f)
5959
if err != nil {
6060
t.Fatal(err)

knowledge/deprecated.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ var StdlibDeprecations = map[string]Deprecation{
164164
"syscall.GetQueuedCompletionStatus": {"go1.17", "go1.0"},
165165
"syscall.CreateIoCompletionPort": {"go1.17", "go1.0"},
166166

167-
// We choose to only track the package itself, even though all functions are derecated individually, too. Anyone
167+
// We choose to only track the package itself, even though all functions are deprecated individually, too. Anyone
168168
// using ioutil directly will have to import it, and this keeps the noise down.
169169
"io/ioutil": {"go1.19", "go1.19"},
170170

staticcheck/sa9007/sa9007.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{
2424
Text: `
2525
It is virtually never correct to delete system directories such as
2626
/tmp or the user's home directory. However, it can be fairly easy to
27-
do by mistake, for example by mistakingly using \'os.TempDir\' instead
27+
do by mistake, for example by mistakenly using \'os.TempDir\' instead
2828
of \'ioutil.TempDir\', or by forgetting to add a suffix to the result
2929
of \'os.UserHomeDir\'.
3030

unused/unused.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ func (g *graph) read(node ast.Node, by types.Object) {
888888
g.read(arg, by)
889889
}
890890

891-
// Handle conversiosn
891+
// Handle conversions
892892
conv := node
893893
if len(conv.Args) != 1 || conv.Ellipsis.IsValid() {
894894
return

0 commit comments

Comments
 (0)