diff --git a/rule/comment-spacings.go b/rule/comment-spacings.go index e0898c3..0d75c55 100644 --- a/rule/comment-spacings.go +++ b/rule/comment-spacings.go @@ -23,6 +23,7 @@ func (r *CommentSpacingsRule) configure(arguments lint.Arguments) { r.allowList = []string{ "//go:", "//revive:", + "//nolint:", } for _, arg := range arguments { diff --git a/testdata/comment-spacings.go b/testdata/comment-spacings.go index 5b1d281..6d94137 100644 --- a/testdata/comment-spacings.go +++ b/testdata/comment-spacings.go @@ -39,3 +39,6 @@ Should be valid /* valid */ + +//nolint:staticcheck // nolint should be in the default list of acceptable comments. +var b string