-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
terraform_fmt.sh doesn't respect excludes #121
Labels
Milestone
Comments
ericfrederich
added a commit
to ericfrederich/pre-commit-terraform
that referenced
this issue
Jun 30, 2020
ericfrederich
added a commit
to ericfrederich/pre-commit-terraform
that referenced
this issue
Jun 30, 2020
ericfrederich
added a commit
to ericfrederich/pre-commit-terraform
that referenced
this issue
Jun 30, 2020
Can someone review this? |
MaxymVlasov
added
estimate/4h
Need 4 hours to be done
feature
New feature or request
labels
Sep 4, 2021
This issue has been automatically marked as stale because it has been open 30 days |
github-actions
bot
added
the
stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Oct 5, 2021
antonbabenko
removed
the
stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Oct 5, 2021
MaxymVlasov
added this to the Features implementing and cleanup without breaking changes milestone
Oct 14, 2021
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\/.*$
|
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
pre-commit
has the ability to exclude files either globally or per hook.The
terraform_fmt.sh
accepts a list of files to format. However, it ends up simply runningterraform fmt
on the dirname of all the files. This means if a file which is explicitly excluded in the.pre-commit-config.yaml
file is sitting in the same directory as a file which is not excluded, it'll end up getting formatted.The
terraform_fmt.sh
script should stop trying to be clever and simply run terraform fmt against the files explicitly handed to it and nothing more.The text was updated successfully, but these errors were encountered: