Skip to content

Commit

Permalink
Load terraform builtin rules before adding exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
chapipo committed Jun 23, 2020
1 parent 3d283e3 commit 26a3a16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ func main() {
fmt.Printf("Failed to load rules: %v\n", err)
os.Exit(-1)
}
ruleSets = addExceptions(ruleSets, profileOptions.Exceptions)
// Same rule set applies to both TerraformBuiltInRules and Terraform11BuiltInRules
// loadBuiltInRuleSet can be called recursively against a directory, as done here,
// or can be called against a single file, as done with lint-rule.yml
Expand All @@ -152,6 +151,9 @@ func main() {
fmt.Println("No rules")
os.Exit(-1)
}

ruleSets = addExceptions(ruleSets, profileOptions.Exceptions)

os.Exit(applyRules(ruleSets, configFilenames, linterOptions, DefaultReportWriter{Writer: os.Stdout}))
}

Expand Down

0 comments on commit 26a3a16

Please sign in to comment.