github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/test/testdata/nolintlint.go (about) 1 //golangcitest:args -Enolintlint -Emisspell 2 //golangcitest:expected_linter nolintlint 3 //golangcitest:config_path testdata/configs/nolintlint.yml 4 package testdata 5 6 import "fmt" 7 8 func Foo() { 9 fmt.Println("not specific") //nolint // want "directive `.*` should mention specific linter such as `//nolint:my-linter`" 10 fmt.Println("not machine readable") // nolint // want "directive `.*` should be written as `//nolint`" 11 fmt.Println("extra spaces") // nolint:unused // because // want "directive `.*` should not have more than one leading space" 12 13 // test expanded range 14 //nolint:misspell // deliberate misspelling to trigger nolintlint 15 func() { 16 mispell := true 17 fmt.Println(mispell) 18 }() 19 }