From fb7c90d6ee085a0c3a529ba53329c6b675d4fbcd Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Sun, 23 May 2021 19:05:38 +0200 Subject: [PATCH] revive: fix excludes (#2005) --- pkg/config/issues.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkg/config/issues.go b/pkg/config/issues.go index b84a61962c86..3b5a780f9405 100644 --- a/pkg/config/issues.go +++ b/pkg/config/issues.go @@ -79,13 +79,25 @@ var DefaultExcludePatterns = []ExcludePattern{ }, { ID: "EXC0012", - Pattern: "exported (method|function|type|const) (.+) should have comment or be unexported", + Pattern: `exported (.+) should have comment or be unexported`, Linter: "revive", Why: "Annoying issue about not having a comment. The rare codebase has such comments", }, { ID: "EXC0013", - Pattern: `package comment should be of the form "Package (.+) ..."`, + Pattern: `package comment should be of the form "(.+)...`, + Linter: "revive", + Why: "Annoying issue about not having a comment. The rare codebase has such comments", + }, + { + ID: "EXC0014", + Pattern: `comment on exported (.+) should be of the form "(.+)..."`, + Linter: "revive", + Why: "Annoying issue about not having a comment. The rare codebase has such comments", + }, + { + ID: "EXC0015", + Pattern: `should have a package comment, unless it's in another file for this package`, Linter: "revive", Why: "Annoying issue about not having a comment. The rare codebase has such comments", },