feat: disable copyloopvar and intrange on Go < 1.22 ()

This commit is contained in:
Ludovic Fernandez 2024-02-19 14:58:58 +01:00 committed by GitHub
parent c65868c105
commit 64492b5e59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 148 additions and 32 deletions

View file

@ -133,12 +133,12 @@ func TestTestsAreLintedByDefault(t *testing.T) {
func TestCgoOk(t *testing.T) {
testshared.NewRunnerBuilder(t).
WithNoConfig().
WithArgs(
"--timeout=3m",
WithArgs("--timeout=3m",
"--enable-all",
"-D",
"nosnakecase,gci",
"nosnakecase",
).
WithArgs("--go=1.22"). // TODO(ldez) remove this line when we will run go1.23 on the CI. (related to intrange, copyloopvar)
WithTargetPath(testdataDir, "cgo").
Runner().
Install().
@ -356,6 +356,7 @@ func TestUnsafeOk(t *testing.T) {
testshared.NewRunnerBuilder(t).
WithNoConfig().
WithArgs("--enable-all").
WithArgs("--go=1.22"). // TODO(ldez) remove this line when we will run go1.23 on the CI. (related to intrange, copyloopvar)
WithTargetPath(testdataDir, "unsafe").
Runner().
Install().
@ -514,6 +515,7 @@ func TestEnableAllFastAndEnableCanCoexist(t *testing.T) {
testshared.NewRunnerBuilder(t).
WithNoConfig().
WithArgs(test.args...).
WithArgs("--go=1.22"). // TODO(ldez) remove this line when we will run go1.23 on the CI. (related to intrange, copyloopvar)
WithTargetPath(testdataDir, minimalPkg).
Runner().
Run().