From de28cda03d9cd173eab130e86e53be9ce5acd35d Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Fri, 16 Oct 2020 15:45:35 -0400 Subject: [PATCH] internal/lsp: remove staticcheck and gofumpt from all experiments Change-Id: I7b60a06ca5442ce2736d3c1a2d55a0f91b4d44fc Reviewed-on: https://go-review.googlesource.com/c/tools/+/263197 Trust: Rebecca Stambler Run-TryBot: Rebecca Stambler gopls-CI: kokoro Reviewed-by: Robert Findley --- gopls/internal/regtest/diagnostics_test.go | 16 ++++++++-------- internal/lsp/source/options.go | 2 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gopls/internal/regtest/diagnostics_test.go b/gopls/internal/regtest/diagnostics_test.go index 394c5a754d..8404ea1a3b 100644 --- a/gopls/internal/regtest/diagnostics_test.go +++ b/gopls/internal/regtest/diagnostics_test.go @@ -1367,19 +1367,19 @@ module mod.com -- main.go -- package main -func main() { - if true {} -}` +import "bytes" + +func b(c bytes.Buffer) { + _ = 1 +} +` withOptions( EditorConfig{ AllExperiments: true, }, ).run(t, mod, func(t *testing.T, env *Env) { - // Confirm that staticcheck is enabled. - env.OpenFile("main.go") - env.Await( - env.DiagnosticAtRegexp("main.go", "if"), - ) + // Confirm that the setting doesn't cause any warnings. + env.Await(NoShowMessage()) }) } diff --git a/internal/lsp/source/options.go b/internal/lsp/source/options.go index a80ab3bdab..bc608881b0 100644 --- a/internal/lsp/source/options.go +++ b/internal/lsp/source/options.go @@ -590,8 +590,6 @@ func (o *Options) enableAllExperiments() { o.ExperimentalDiagnosticsDelay = 200 * time.Millisecond o.ExperimentalWorkspaceModule = true o.ExperimentalPackageCacheKey = true - o.Staticcheck = true - o.Gofumpt = true o.SymbolStyle = DynamicSymbols o.Codelens[CommandToggleDetails.Name] = true o.Analyses[unusedparams.Analyzer.Name] = true