gopls/internal/test/integration: fix TestSimplifyCompositeLitDiagnostic This test used to be called TestStaticcheckDiagnostic and verified that staticcheck would generate a diagnostic to simplify the literal with a redundant type. Now, it tests the gopls analyzer simplifycompositelit, so it should not run the staticcheck analyzers. My guess is that this test is flaky because there is some race condition happening due to setting staticcheck: true, which triggers an expensive process. (We recently updated staticcheck so maybe the timing is related) Will investigate more, but this should fix the flake. Fixes golang/go#81281 Change-Id: If34b5e265d765cfa1c02b444b9ddeb773375d1ea Reviewed-on: https://go-review.googlesource.com/c/tools/+/826024 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Peter Weinberger <pjw@google.com>
diff --git a/gopls/internal/test/integration/diagnostics/diagnostics_test.go b/gopls/internal/test/integration/diagnostics/diagnostics_test.go index c5a5f93..d812ee2 100644 --- a/gopls/internal/test/integration/diagnostics/diagnostics_test.go +++ b/gopls/internal/test/integration/diagnostics/diagnostics_test.go
@@ -1337,10 +1337,7 @@ fmt.Println(x) } ` - - WithOptions( - Settings{"staticcheck": true}, - ).Run(t, files, func(t *testing.T, env *Env) { + Run(t, files, func(t *testing.T, env *Env) { env.OpenFile("main.go") var d protocol.PublishDiagnosticsParams env.AfterChange(