Skip to content

Commit

Permalink
Remove unused ruleset function (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 authored Aug 27, 2022
1 parent 3b6ea1a commit 47ada1d
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions tflint/ruleset.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,6 @@ func (r *BuiltinRuleSet) ApplyConfig(content *hclext.BodyContent) error {
return nil
}

// ApplyCommonConfig reflects common configurations regardless of plugins.
func (r *BuiltinRuleSet) ApplyCommonConfig(config *Config) {
r.EnabledRules = []Rule{}

if config.DisabledByDefault {
log.Printf("[DEBUG] Only mode is enabled. Ignoring default plugin rules")
}

for _, rule := range r.Rules {
enabled := rule.Enabled()
if cfg := config.Rules[rule.Name()]; cfg != nil {
enabled = cfg.Enabled
} else if config.DisabledByDefault {
enabled = false
}

if enabled {
r.EnabledRules = append(r.EnabledRules, rule)
}
}
}

// Check runs inspection for each rule by applying Runner.
func (r *BuiltinRuleSet) Check(runner Runner) error {
for _, rule := range r.EnabledRules {
Expand Down

0 comments on commit 47ada1d

Please sign in to comment.