Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/analysis/internal/checker/fix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ var relatedAnalyzer = &analysis.Analyzer{
},
}

// panics asserts that f() panics with with a value whose printed form matches the regexp want.
// panics asserts that f() panics with a value whose printed form matches the regexp want.
func panics(t *testing.T, want string, f func()) {
defer func() {
if x := recover(); x == nil {
Expand Down
2 changes: 1 addition & 1 deletion go/analysis/passes/printf/testdata/src/a/a.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func PrintfTests() {
fmt.Println("%v", "hi") // want "fmt.Println call has possible Printf formatting directive %v"
fmt.Println("%T", "hi") // want "fmt.Println call has possible Printf formatting directive %T"
fmt.Println("%s"+" there", "hi") // want "fmt.Println call has possible Printf formatting directive %s"
fmt.Println("http://foo.com?q%2Fabc") // no diagnostic: %XX is excepted
fmt.Println("http://foo.com?q%2Fabc") // no diagnostic: %XX is expected
fmt.Println("http://foo.com?q%2Fabc-%s") // want"fmt.Println call has possible Printf formatting directive %s"
fmt.Println("0.0%") // correct (trailing % couldn't be a formatting directive)
fmt.Printf("%s", "hi", 3) // want "fmt.Printf call needs 1 arg but has 2 args"
Expand Down
2 changes: 1 addition & 1 deletion go/types/objectpath/objectpath_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func TestIssue70418(t *testing.T) {
// objectpath would inspect the methods of I:
// - First we see I.A, which leads to Anon, to F, which is marked as seen.
// - Second we see I.F, embedded via alias Anon.
// Since we've already seen F, we break ouf the the interface method loop.
// Since we've already seen F, we break out of the interface method loop.
// - Third, we fail to visit I.Z.
// The solution is to skip only I.F, not the rest of the interface.

Expand Down
2 changes: 1 addition & 1 deletion gopls/doc/features/transformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ form.

When the selection is within an `if`/`else` statement that is not
followed by `else if`, gopls offers a code action to invert the
statement, negating the condition and swapping the `if` and and `else`
statement, negating the condition and swapping the `if` and `else`
blocks.

![Before "Invert if condition"](../assets/invert-if-before.png)
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/analysis/yield/yield.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ func (s state) update(num int, mask, sense bool) state {

// -- SSA CFG as graph.Graph --

// fnGraph adapts an [ssa.Function] to to the [graph.Graph] interface
// fnGraph adapts an [ssa.Function] to the [graph.Graph] interface
// required by the flow analysis framework.
// Nodes are labelled by their block indices and connected by the
// successor relation.
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cache/os_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func windowsCheckPathValid(path string) error {
}
longstr := syscall.UTF16ToString(long)

// Check that the the path -> short -> long roundtrip was idempotent.
// Check that the path -> short -> long roundtrip was idempotent.
isRoot := func(p string) bool {
return p[len(p)-1] == filepath.Separator
}
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/codeaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ to be executed by the server, which may have an effect such as:
- changing the state of the server; or
- requesting that the client open a document.

The -kind and and -title flags filter the list of actions.
The -kind and -title flags filter the list of actions.

The -kind flag specifies a comma-separated list of LSP CodeAction kinds.
Only actions of these kinds will be requested from the server.
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/usage/codeaction.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to be executed by the server, which may have an effect such as:
- changing the state of the server; or
- requesting that the client open a document.

The -kind and and -title flags filter the list of actions.
The -kind and -title flags filter the list of actions.

The -kind flag specifies a comma-separated list of LSP CodeAction kinds.
Only actions of these kinds will be requested from the server.
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/filewatcher/filewatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func TestBrokenSymlink(t *testing.T) {
}

{
// Prepare a dir with with broken symbolic link.
// Prepare a dir with broken symbolic link.
// foo <- 1st
// ├── from.go -> root/to.go <- 1st
// ├── a.go <- 1st
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/codelens/codelens_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func Foo() {
}
`
Run(t, workspace, func(t *testing.T, env *Env) {
// Open the file. We have a nonexistant symbol that will break cgo processing.
// Open the file. We have a nonexistent symbol that will break cgo processing.
env.OpenFile("cgo.go")
env.AfterChange(
Diagnostics(env.AtRegexp("cgo.go", ``), WithMessage("go list failed to return CompiledGoFiles")),
Expand Down