Closed sblask closed 2 years ago
Looks like this did work and I got confused with the versions. However, with:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.52.0
hooks:
- id: terraform_fmt
- id: terraform_tflint
I get:
Terraform validate with tflint...........................................Failed
- hook id: terraform_tflint
- exit code: 3
ERROR in ././:
So the actual message is missing.
Seeing the same issue with new version. Any ETA when this will be fixed?
This works as expected. (for 1.50.0 too)
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.51.0
hooks:
- id: terraform_fmt
- id: terraform_tflint
Just need to rename tflint.hcl
to .tflint.hcl
Confirm ERROR in ././:
output in v1.52.0
Downgrade to v1.51.0 and wait fix
Describe the bug
tflint
has checks liketerraform_unused_declarations
that can only reasonably be checked across multiple files and terraform_tflint does not find them because it only checks single files.How can we reproduce it?
Create a directory with two files: variables.tf and main.tf and add to variables.tf:
Also add a tflint.hcl:
pre-commit run --all-files
will not find a problem. I wrote an own hook that does:gives:
terraform_tflint
should give the same warning?Environment information
.pre-commit-config.yaml
: