File tree Expand file tree Collapse file tree 4 files changed +3
-7
lines changed Expand file tree Collapse file tree 4 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ linters-settings:
6161 misspell :
6262 locale : US
6363 nolintlint :
64- allow-leading-space : false
6564 allow-unused : false # report any unused nolint directives
6665 require-explanation : false # don't require an explanation for nolint directives
6766 require-specific : false # don't require nolint directives to be specific about which linter is being skipped
Original file line number Diff line number Diff line change 11//golangcitest:args -Enolintlint -Elll
22//golangcitest:expected_linter nolintlint
3- //golangcitest:config linters-settings.nolintlint.allow-leading-space=false
43package p
54
65import "fmt"
Original file line number Diff line number Diff line change 11//golangcitest:args -Enolintlint -Elll
22//golangcitest:expected_linter nolintlint
3- //golangcitest:config linters-settings.nolintlint.allow-leading-space=false
43package p
54
65import "fmt"
@@ -10,8 +9,8 @@ func nolintlint() {
109 fmt .Println () //nolint:bob // leading spaces should be dropped
1110
1211 // note that the next lines will retain trailing whitespace when fixed
13- fmt .Println ()
14- fmt .Println ()
12+ fmt .Println ()
13+ fmt .Println ()
1514
1615 fmt .Println () //nolint:alice,lll // we don't drop individual linters from lists
1716}
Original file line number Diff line number Diff line change 22//golangcitest:expected_linter nolintlint
33//golangcitest:config linters-settings.nolintlint.require-explanation=true
44//golangcitest:config linters-settings.nolintlint.require-specific=true
5- //golangcitest:config linters-settings.nolintlint.allow-leading-space=false
65package testdata
76
87import "fmt"
98
109func Foo () {
11- fmt .Println ("not specific" ) //nolint // ERROR "directive `.*` should mention specific linter such as `//nolint:my-linter`"
10+ fmt .Println ("not specific" ) // nolint // ERROR "directive `.*` should mention specific linter such as `//nolint:my-linter`"
1211 fmt .Println ("not machine readable" ) // nolint // ERROR "directive `.*` should be written as `//nolint`"
1312 fmt .Println ("extra spaces" ) // nolint:deadcode // because // ERROR "directive `.*` should not have more than one leading space"
1413
You can’t perform that action at this time.
0 commit comments