-
-
Notifications
You must be signed in to change notification settings - Fork 545
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
tflint 0.40.0 changes seem to break current terraform_tflint hook configuration #434
Comments
Feedback from the For |
@tofupup Thanks for the update.
What would be your rough estimate on the effort to implement this? |
I think a basic pass would take a couple of hours at most. After some testing tonight, we could generate a temporary static That said...
I guess it comes down to how much ownership Looking at the Part of the problem is using Maybe just an added section to the Sorry, kind of rambling as I don't know what the right path is. I ran into this issue while running |
Yep, I hold the same view of «the hook is just passing arguments», so we should keep as minimal intrusion as possible. The main goal of
Also would be keen what @antonbabenko's and @MaxymVlasov's thoughts on this are. |
First, I highly appreciate the detailed input from everyone! I think that since we are not making a lot of assumptions and modifications of the arguments passed to |
Describe the bug
tflint
release 0.40.0 made some breaking changes that look to impact how it uses--only
CLI options to specify rules. I've opened issue terraform-linters/tflint#1513 to see if this is a bug that they will fix, or ifpre-commit-terraform
will need to modify theterraform_tflint
hook to accommodate future versions.Short summary is
tflint
has rolled theterraform
plugin into the released binary, and now support an option in the configuration file to enable eitherall
orrecommended
rules. By default, with no configuration file, it will go withrecommended
. However, if you runtflint
0.40.0 with--only=terraform_naming_convention
(not a rule part of therecommended
set), the rule does not get run. If you use theall
rule preset in thetflint
configuration file, the--only=
option gets ignored and all rules are run.Once I get a response on the
tflint
issue, I'll update here if it looks like changes will be needed. In the interim, if a new docker container is built automatically, it will includetflint
0.40.0, which will no longer run all of the tests expected interraform_tflint
. Pinning thetflint
version in the github workflows might be considered until a response in thetflint
issue.How can we reproduce it?
Update
tflint
to 0.40.0 and runpre-commit run -a terraform_tflint
on a file that will trigger rules not in therecommended
list.Files
`private-codecommit-repo/main.tf`.pre-commit-config.yaml
:terraform_tflint with tflint 0.39.3
terraform_tflint with tflint 0.40.0
Environment information
uname -a
and/orsysteminfo | Select-String "^OS"
output:❯ uname -a Linux efc04b3806ca 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
.pre-commit-config.yaml
:file content
The text was updated successfully, but these errors were encountered: