Skip to content

Commit

Permalink
Override RuleNames (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 authored Jan 10, 2021
1 parent cbf6e50 commit d3ce940
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions aws/ruleset.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ type RuleSet struct {
config *Config
}

// RuleNames is a list of rule names provided by the plugin.
func (r *RuleSet) RuleNames() []string {
names := []string{}
for _, rule := range r.Rules {
names = append(names, rule.Name())
}
for _, rule := range r.APIRules {
names = append(names, rule.Name())
}
return names
}

// ApplyConfig reflects the plugin configuration to the ruleset.
func (r *RuleSet) ApplyConfig(config *tflint.Config) error {
r.ApplyCommonConfig(config)
Expand Down

0 comments on commit d3ce940

Please sign in to comment.