feat: TFLint: Add --hook-config=--delegate-chdir to use tflint -chdir (#512)

Co-authored-by: Maksym Vlasov <MaxymVlasov@users.noreply.github.com>
This commit is contained in:
Luke 2023-05-08 11:32:06 -04:00 committed by GitHub
commit 1e9debc02f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 101 additions and 16 deletions

View file

@ -604,6 +604,14 @@ To replicate functionality in `terraform_docs` hook:
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
```
3. By default pre-commit-terraform performs directory switching into the terraform modules for you. If you want to delgate the directory changing to the binary - this will allow tflint to determine the full paths for error/warning messages, rather than just module relative paths. *Note: this requires `tflint>=0.44.0`.* For example:
```yaml
- id: terraform_tflint
args:
- --hook-config=--delegate-chdir
```
### terraform_tfsec