Skip to content

Commit 77aa08b

Browse files
committedMar 16, 2022
internal/completion: default to regular completion for f.Fuzz without f.Add
Change-Id: I7a05dba3f4a68c2075ebdf078e9e0ee6cfd97f28 Reviewed-on: https://go-review.googlesource.com/c/tools/+/393019 Run-TryBot: Peter Weinberger <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Trust: Peter Weinberger <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent 6799a7a commit 77aa08b

File tree

1 file changed

+3
-1
lines changed
  • internal/lsp/source/completion

1 file changed

+3
-1
lines changed
 

‎internal/lsp/source/completion/fuzz.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ Loop:
100100
}
101101
ast.Inspect(n, f)
102102
if add == nil {
103-
return true
103+
// looks like f.Fuzz without a preceding f.Add.
104+
// let the regular completion handle it.
105+
return false
104106
}
105107

106108
lbl := "Fuzz(func(t *testing.T"

0 commit comments

Comments
 (0)
Please sign in to comment.