mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
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:
parent
1431664e59
commit
1e9debc02f
12 changed files with 101 additions and 16 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue