зеркало из https://github.com/golang/tools.git
gopls/internal/test: temporarily disable staticcheck with gotypesalias=1
staticcheck will need work to accommodate gotypesalias=1. In the meantime we disable this test in that mode; we plan to reenable it before the next gopls release. Updates golang/go#65294 Change-Id: I857edb758f83f180a4d92b7100e99c3401b1d957 Reviewed-on: https://go-review.googlesource.com/c/tools/+/575698 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Родитель
118b98be87
Коммит
85b65275a6
|
@ -5,6 +5,8 @@
|
|||
package misc
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/tools/internal/testenv"
|
||||
|
@ -15,6 +17,11 @@ import (
|
|||
func TestStaticcheckGenerics(t *testing.T) {
|
||||
testenv.NeedsGo1Point(t, 20) // staticcheck requires go1.20+
|
||||
|
||||
// TODO(golang/go#65249): re-enable and fix this test with gotypesalias=1.
|
||||
if strings.Contains(os.Getenv("GODEBUG"), "gotypesalias=1") {
|
||||
t.Skipf("staticcheck needs updates for materialized aliases")
|
||||
}
|
||||
|
||||
const files = `
|
||||
-- go.mod --
|
||||
module mod.com
|
||||
|
@ -79,6 +86,12 @@ var FooErr error = errors.New("foo")
|
|||
// analysis.RelatedInformation.End is not set.
|
||||
func TestStaticcheckRelatedInfo(t *testing.T) {
|
||||
testenv.NeedsGo1Point(t, 20) // staticcheck is only supported at Go 1.20+
|
||||
|
||||
// TODO(golang/go#65249): re-enable and fix this test with gotypesalias=1.
|
||||
if strings.Contains(os.Getenv("GODEBUG"), "gotypesalias=1") {
|
||||
t.Skipf("staticcheck needs updates for materialized aliases")
|
||||
}
|
||||
|
||||
const files = `
|
||||
-- go.mod --
|
||||
module mod.test
|
||||
|
|
Загрузка…
Ссылка в новой задаче