Skip to content

Commit e20c778

Browse files
authored
add nolint to default list of acceptable comments for comment-spacings (#822)
1 parent 022236f commit e20c778

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

rule/comment-spacings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func (r *CommentSpacingsRule) configure(arguments lint.Arguments) {
2323
r.allowList = []string{
2424
"//go:",
2525
"//revive:",
26+
"//nolint:",
2627
}
2728

2829
for _, arg := range arguments {

testdata/comment-spacings.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ Should be valid
3939

4040
/* valid
4141
*/
42+
43+
//nolint:staticcheck // nolint should be in the default list of acceptable comments.
44+
var b string

0 commit comments

Comments
 (0)