We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79bac57 commit 512ac9fCopy full SHA for 512ac9f
pkg/golinters/revive.go
@@ -7,6 +7,7 @@ import (
7
"go/token"
8
"os"
9
"reflect"
10
+ "strings"
11
"sync"
12
13
"github.com/BurntSushi/toml"
@@ -405,7 +406,17 @@ func ignoreRules(conf *lint.Config) {
405
406
"var-declaration",
407
}
408
409
+ var ignored []string
410
for _, s := range f {
- delete(conf.Rules, s)
411
+ if _, ok := conf.Rules[s]; ok {
412
+ delete(conf.Rules, s)
413
+ ignored = append(ignored, s)
414
+ }
415
416
+
417
+ if len(ignored) > 0 {
418
+ linterLogger.Warnf("revive: the following rules (%s) are ignored due to a performance problem "+
419
+ "(https://github.com/golangci/golangci-lint/issues/2997)",
420
+ strings.Join(ignored, ","))
421
422
0 commit comments