Skip to content

Commit ebd90a9

Browse files
feat(config): check rule argument and flags in Validate
1 parent d4b960a commit ebd90a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

config/config.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,15 @@ func Validate(conf *lint.Config) error {
103103
}
104104

105105
// Check if rule is registered
106-
_, ok := globalRegistry.GetRule(ruleName)
106+
ruleData, ok := globalRegistry.GetRule(ruleName)
107107
if !ok {
108108
return fmt.Errorf("unknown rule '%s'", ruleName)
109109
}
110+
111+
err := ruleData.Apply(r.Argument, r.Flags)
112+
if err != nil {
113+
return err
114+
}
110115
}
111116

112117
return nil

0 commit comments

Comments
 (0)