diff --git a/test/testdata/fix/in/nolintlint.go b/test/testdata/fix/in/nolintlint.go index 7f17fa91226c..ae7b73589bce 100644 --- a/test/testdata/fix/in/nolintlint.go +++ b/test/testdata/fix/in/nolintlint.go @@ -7,7 +7,10 @@ import "fmt" func nolintlint() { fmt.Println() // nolint:bob // leading space should be dropped fmt.Println() // nolint:bob // leading spaces should be dropped + // note that the next lines will retain trailing whitespace when fixed fmt.Println() //nolint // nolint should be dropped fmt.Println() //nolint:lll // nolint should be dropped + + fmt.Println() //nolint:alice,lll // we don't drop individual linters from lists } diff --git a/test/testdata/fix/out/nolintlint.go b/test/testdata/fix/out/nolintlint.go index 81f021dbffd3..9ec6800a7d62 100644 --- a/test/testdata/fix/out/nolintlint.go +++ b/test/testdata/fix/out/nolintlint.go @@ -7,7 +7,10 @@ import "fmt" func nolintlint() { fmt.Println() //nolint:bob // leading space should be dropped fmt.Println() //nolint:bob // leading spaces should be dropped + // note that the next lines will retain trailing whitespace when fixed fmt.Println() fmt.Println() + + fmt.Println() //nolint:alice,lll // we don't drop individual linters from lists }