Skip to content

Commit d3ce940

Browse files
authored
Override RuleNames (#40)
1 parent cbf6e50 commit d3ce940

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

aws/ruleset.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ type RuleSet struct {
1414
config *Config
1515
}
1616

17+
// RuleNames is a list of rule names provided by the plugin.
18+
func (r *RuleSet) RuleNames() []string {
19+
names := []string{}
20+
for _, rule := range r.Rules {
21+
names = append(names, rule.Name())
22+
}
23+
for _, rule := range r.APIRules {
24+
names = append(names, rule.Name())
25+
}
26+
return names
27+
}
28+
1729
// ApplyConfig reflects the plugin configuration to the ruleset.
1830
func (r *RuleSet) ApplyConfig(config *tflint.Config) error {
1931
r.ApplyCommonConfig(config)

0 commit comments

Comments
 (0)