Skip to content

Commit

Permalink
add nolint to default list of acceptable comments for comment-spacings (
Browse files Browse the repository at this point in the history
  • Loading branch information
natefinch committed May 9, 2023
1 parent 022236f commit e20c778
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions rule/comment-spacings.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func (r *CommentSpacingsRule) configure(arguments lint.Arguments) {
r.allowList = []string{
"//go:",
"//revive:",
"//nolint:",
}

for _, arg := range arguments {
Expand Down
3 changes: 3 additions & 0 deletions testdata/comment-spacings.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ Should be valid

/* valid
*/

//nolint:staticcheck // nolint should be in the default list of acceptable comments.
var b string

0 comments on commit e20c778

Please sign in to comment.