We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9173967 commit bdc29ddCopy full SHA for bdc29dd
config/config.go
@@ -91,6 +91,16 @@ func Validate(conf *lint.Config) []error {
91
}
92
93
94
+ // Check for duplicate rules
95
+ ruleSeen := make(map[string]struct{}, len(conf.Rules))
96
+ for _, ruleName := range conf.Rules {
97
+ if _, exists := ruleSeen[ruleName]; exists {
98
+ errs = append(errs, fmt.Errorf("duplicate rule '%s' in rules list", ruleName))
99
+ } else {
100
+ ruleSeen[ruleName] = struct{}{}
101
+ }
102
103
+
104
for ruleName, ruleSetting := range conf.Settings {
105
// Check if rule is registered
106
ruleData, ok := registry.GetRule(ruleName)
0 commit comments