golangci-lint/test/testdata/fix/in/nolintlint.go
Andrew Shannon Brown aeb9830329
Update nolintlint to fix nolint formatting and remove unused nolint statements (#1573)
Also allow multiple ranges to satisfy a nolint statement as having been used.
2020-12-27 06:18:02 -08:00

14 lines
577 B
Go

//args: -Enolintlint -Elll
//config: linters-settings.nolintlint.allow-leading-space=false
package p
func nolintlint() {
run() // nolint:bob // leading space should be dropped
run() // nolint:bob // leading spaces should be dropped
// note that the next lines will retain trailing whitespace when fixed
run() //nolint // nolint should be dropped
run() //nolint:lll // nolint should be dropped
run() //nolint:alice,lll,bob // enabled linter should be dropped
run() //nolint:alice,lll,bob,nolintlint // enabled linter should not be dropped when nolintlint is nolinted
}