From e20c7788f9b1f269ee72d2251dccef8bbec9caea Mon Sep 17 00:00:00 2001 From: Nate Finch Date: Tue, 9 May 2023 10:20:58 -0400 Subject: [PATCH] add nolint to default list of acceptable comments for comment-spacings (#822) --- rule/comment-spacings.go | 1 + testdata/comment-spacings.go | 3 +++ 2 files changed, 4 insertions(+) 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