From 67230329264975e08fd6dd9247b3c321a2700a7b Mon Sep 17 00:00:00 2001 From: "Andrew S. Brown" Date: Sat, 20 Feb 2021 14:05:17 -0800 Subject: [PATCH] Add test for multiple linters --- test/testdata/fix/in/nolintlint.go | 3 +++ test/testdata/fix/out/nolintlint.go | 3 +++ 2 files changed, 6 insertions(+) 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 }