mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-07-27 22:48:49 -04:00
feat: disable copyloopvar and intrange on Go < 1.22 (#4397)
This commit is contained in:
parent
c65868c105
commit
64492b5e59
12 changed files with 148 additions and 32 deletions
test
|
@ -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().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue