aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHana (Hyang-Ah) Kim <hyangah@gmail.com>2023-02-28 23:17:14 -0500
committerHyang-Ah Hana Kim <hyangah@gmail.com>2023-03-02 16:24:09 +0000
commitef396af5bf978f47ccabe57449aca67bb718b87b (patch)
tree97ada1506834e07b92dc211fdc7333f7f8cebe70
parentfbb25cbbd5ff5845639a3035f1fb7ddfd0ac0624 (diff)
downloadgolang-x-tools-ef396af5bf978f47ccabe57449aca67bb718b87b.tar.gz
gopls: sync staticcheck@v0.4.2
Staticcheck@v0.4.2 includes code that requires go1.19+. Set StaticcheckSupported only for go1.19+. For golang/vscode-go#2683 Change-Id: Ib025cb0286e5c26d85060af1f4f6a6495bcf5867 Reviewed-on: https://go-review.googlesource.com/c/tools/+/472377 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com>
-rw-r--r--gopls/go.mod2
-rw-r--r--gopls/go.sum7
-rw-r--r--gopls/internal/hooks/analysis_116.go4
-rw-r--r--gopls/internal/hooks/analysis_119.go (renamed from gopls/internal/hooks/analysis_117.go)4
-rw-r--r--gopls/internal/regtest/misc/configuration_test.go4
-rw-r--r--gopls/internal/regtest/misc/staticcheck_test.go4
6 files changed, 12 insertions, 13 deletions
diff --git a/gopls/go.mod b/gopls/go.mod
index da7984f9d..c544aac19 100644
--- a/gopls/go.mod
+++ b/gopls/go.mod
@@ -14,7 +14,7 @@ require (
golang.org/x/tools v0.4.1-0.20221217013628-b4dfc36097e2
golang.org/x/vuln v0.0.0-20230110180137-6ad3e3d07815
gopkg.in/yaml.v3 v3.0.1
- honnef.co/go/tools v0.3.3
+ honnef.co/go/tools v0.4.2
mvdan.cc/gofumpt v0.4.0
mvdan.cc/xurls/v2 v2.4.0
)
diff --git a/gopls/go.sum b/gopls/go.sum
index fd01bae2d..53d7d0d92 100644
--- a/gopls/go.sum
+++ b/gopls/go.sum
@@ -1,5 +1,4 @@
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
@@ -47,7 +46,7 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA=
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA=
-golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
+golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp/typeparams v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
golang.org/x/exp/typeparams v0.0.0-20221212164502-fae10dda9338/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
@@ -91,8 +90,8 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.2.2/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY=
-honnef.co/go/tools v0.3.3 h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA=
-honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw=
+honnef.co/go/tools v0.4.2 h1:6qXr+R5w+ktL5UkwEbPp+fEvfyoMPche6GkOpGHZcLc=
+honnef.co/go/tools v0.4.2/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA=
mvdan.cc/gofumpt v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
mvdan.cc/gofumpt v0.4.0/go.mod h1:PljLOHDeZqgS8opHRKLzp2It2VBuSdteAgqUfzMTxlQ=
mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5 h1:Jh3LAeMt1eGpxomyu3jVkmVZWW2MxZ1qIIV2TZ/nRio=
diff --git a/gopls/internal/hooks/analysis_116.go b/gopls/internal/hooks/analysis_116.go
index dd429dea8..de58632ba 100644
--- a/gopls/internal/hooks/analysis_116.go
+++ b/gopls/internal/hooks/analysis_116.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !go1.17
-// +build !go1.17
+//go:build !go1.19
+// +build !go1.19
package hooks
diff --git a/gopls/internal/hooks/analysis_117.go b/gopls/internal/hooks/analysis_119.go
index 27ab9a699..1f81d7be6 100644
--- a/gopls/internal/hooks/analysis_117.go
+++ b/gopls/internal/hooks/analysis_119.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build go1.17
-// +build go1.17
+//go:build go1.19
+// +build go1.19
package hooks
diff --git a/gopls/internal/regtest/misc/configuration_test.go b/gopls/internal/regtest/misc/configuration_test.go
index 6e6d9d733..6cbfe373e 100644
--- a/gopls/internal/regtest/misc/configuration_test.go
+++ b/gopls/internal/regtest/misc/configuration_test.go
@@ -15,10 +15,10 @@ import (
// Test that enabling and disabling produces the expected results of showing
// and hiding staticcheck analysis results.
func TestChangeConfiguration(t *testing.T) {
- // Staticcheck only supports Go versions >= 1.17.
+ // Staticcheck only supports Go versions >= 1.19.
// Note: keep this in sync with TestStaticcheckWarning. Below this version we
// should get an error when setting staticcheck configuration.
- testenv.NeedsGo1Point(t, 17)
+ testenv.NeedsGo1Point(t, 19)
const files = `
-- go.mod --
diff --git a/gopls/internal/regtest/misc/staticcheck_test.go b/gopls/internal/regtest/misc/staticcheck_test.go
index 9242e194e..fa049ab0e 100644
--- a/gopls/internal/regtest/misc/staticcheck_test.go
+++ b/gopls/internal/regtest/misc/staticcheck_test.go
@@ -13,7 +13,7 @@ import (
)
func TestStaticcheckGenerics(t *testing.T) {
- testenv.NeedsGo1Point(t, 18) // generics were introduced in Go 1.18
+ testenv.NeedsGo1Point(t, 19) // generics were introduced in Go 1.18, staticcheck requires go1.19+
const files = `
-- go.mod --
@@ -78,7 +78,7 @@ var FooErr error = errors.New("foo")
// Test for golang/go#56270: an analysis with related info should not panic if
// analysis.RelatedInformation.End is not set.
func TestStaticcheckRelatedInfo(t *testing.T) {
- testenv.NeedsGo1Point(t, 17) // staticcheck is only supported at Go 1.17+
+ testenv.NeedsGo1Point(t, 19) // staticcheck is only supported at Go 1.19+
const files = `
-- go.mod --
module mod.test