Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow redefinition of the NewRunner function in RuleSet #191

Closed
wata727 opened this issue Sep 5, 2022 · 0 comments · Fixed by #225
Closed

Allow redefinition of the NewRunner function in RuleSet #191

wata727 opened this issue Sep 5, 2022 · 0 comments · Fixed by #225

Comments

@wata727
Copy link
Member

wata727 commented Sep 5, 2022

Some rulesets redefine Check() to support custom runners in rulesets. e.g.
https://github.com/terraform-linters/tflint-ruleset-aws/blob/v0.16.1/aws/ruleset.go#L46-L59
https://github.com/terraform-linters/tflint-ruleset-google/blob/v0.19.0/google/ruleset.go#L46-L59

What we want to do here is inject a custom runner, so it's nonsense to redefine checking.

Define a NewRunner function in RuleSet so that built-in rulesets always use that function. This allows custom rulesets to inject a custom runner by simply redefining the NewRunner(). No need to redefine Check().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant