Honor excludes; don't run against entire directories (closes #121)#122
Honor excludes; don't run against entire directories (closes #121)#122ericfrederich wants to merge 1 commit into
Conversation
35d5fa4 to
33f9f5f
Compare
|
https://github.com/antonbabenko/pre-commit-terraform/blob/2e40ade8d0bdff4eea5fb64e55d6f40a71768426/CHANGELOG.md#v120---2017-06-08 the I ran into this while upgrading a module mono repo to 0.12. My client is using the 0.11 version of the module but the 0.12 version of the module comes along for the ride. When trying to commit my changes on a repo that uses the module, I get: Error running fmt: In .terraform/modules/26b44daf48f2995f5f7159f55b3e58ba/0.12/datadog.tf: At 5:25: Unknown token: 5:25 IDENT var.monitor_nameI have my pre-commit configured as: - repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.31.0
hooks:
- id: terraform_fmt
exclude: \.terraform\/.*$I think it is the same issue that was raised back in #8 from long ago. The hook gets passed the list of files and the |
|
This PR has been automatically marked as stale because it has been open 30 days |
|
Works fine with the latest version repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.62.3
hooks:
- id: terraform_fmt
exclude: environment\/.*$
|
Closes #121