File tree 4 files changed +3
-7
lines changed
4 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ linters-settings:
61
61
misspell :
62
62
locale : US
63
63
nolintlint :
64
- allow-leading-space : false
65
64
allow-unused : false # report any unused nolint directives
66
65
require-explanation : false # don't require an explanation for nolint directives
67
66
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 1
1
//golangcitest:args -Enolintlint -Elll
2
2
//golangcitest:expected_linter nolintlint
3
- //golangcitest:config linters-settings.nolintlint.allow-leading-space=false
4
3
package p
5
4
6
5
import "fmt"
Original file line number Diff line number Diff line change 1
1
//golangcitest:args -Enolintlint -Elll
2
2
//golangcitest:expected_linter nolintlint
3
- //golangcitest:config linters-settings.nolintlint.allow-leading-space=false
4
3
package p
5
4
6
5
import "fmt"
@@ -10,8 +9,8 @@ func nolintlint() {
10
9
fmt .Println () //nolint:bob // leading spaces should be dropped
11
10
12
11
// note that the next lines will retain trailing whitespace when fixed
13
- fmt .Println ()
14
- fmt .Println ()
12
+ fmt .Println ()
13
+ fmt .Println ()
15
14
16
15
fmt .Println () //nolint:alice,lll // we don't drop individual linters from lists
17
16
}
Original file line number Diff line number Diff line change 2
2
//golangcitest:expected_linter nolintlint
3
3
//golangcitest:config linters-settings.nolintlint.require-explanation=true
4
4
//golangcitest:config linters-settings.nolintlint.require-specific=true
5
- //golangcitest:config linters-settings.nolintlint.allow-leading-space=false
6
5
package testdata
7
6
8
7
import "fmt"
9
8
10
9
func 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`"
12
11
fmt .Println ("not machine readable" ) // nolint // ERROR "directive `.*` should be written as `//nolint`"
13
12
fmt .Println ("extra spaces" ) // nolint:deadcode // because // ERROR "directive `.*` should not have more than one leading space"
14
13
You can’t perform that action at this time.
0 commit comments