-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
Can't use arguments for module inspection #76
Comments
To make it work you need two things:
I have no clue how this is working for anyone: https://github.com/antonbabenko/pre-commit-terraform#notes-about-terraform_tflint-hooks
Maybe I'm missing something important. Per the code in the the script and according to the way how pre-commit passes arguments to the scripts (https://pre-commit.com/#passing-arguments-to-hooks), the only solution which I see is this:
|
Yea, this is busted for me too. Tried with a different module just to make sure and it also fails
|
The story is the same for both terraform_docs and terraform_tflint as they use the same method of sorting out arguments (getopt) which is making handling arguments in specific way. |
Same here with
it works. However I can't seem to add more args, and this seems like a very bad workaround. Any thoughts @antonbabenko? |
In an interesting twist the following seems work:
|
As @Vlaaaaaaad is saying but enquote values to be like strings. Like this:
|
OK, that seems to be working. Would be nice for it to be consistent with other pre-commit hook args (as the README indicates). |
Agree, we can update README to show the examples for both. |
Hello!
I'm not sure why but I can't add arguments to
terraform_tflint
hook. I'm trying to usetflint --module
or any argument but I always get the following error message:getopt: unrecognize option '--module'
Project structures
I'm using official terraform modules which are located in the
.terraform
file and custom modules.or
pre-commit-config.yaml
just contains the following hooks :I use
TFLint version 0.13.1
,pre-commit 1.20.0
andpre-commit-terraform v1.21.0
. pre-commit is up to date.Is there something I'm missing ? If you have any suggestion or workaround to help us with this problem, I'd greatly appreciate it.
The text was updated successfully, but these errors were encountered: