You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be useful to be able to run subprocess specified by the configuration against files.
I thought of this idea because currently the pre-commit-terraform hooks are implemented in Bash which is fine for Linux systems, or Windows if you're using WSL or Git Bash, but it fails from powershell or a regular command prompt.
I'm working with them to port hooks from bash to Python (since pre-commit is Python based anyway).
While I wait for this PR to maybe get accepted, I was thinking it would be nice if this pre-commit-hooks repo had a hook where you could just specify a generic command.
Maybe it could behave similar to something like Bash's xargs. Maybe even give the hook the id of xargs?
Example:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooksrev: vX.Y.Zhooks:
# run terraform fmt against all .tf and .tfvars files
- id: xargsargs: ["terraform", "fmt"]files: \.tf(vars)?$exclude: \.terraform/.*$
The text was updated successfully, but these errors were encountered:
I'm happy to implement this if it is acceptable.
I think it would be useful to be able to run subprocess specified by the configuration against files.
I thought of this idea because currently the
pre-commit-terraform
hooks are implemented in Bash which is fine for Linux systems, or Windows if you're using WSL or Git Bash, but it fails from powershell or a regular command prompt.I'm working with them to port hooks from bash to Python (since pre-commit is Python based anyway).
While I wait for this PR to maybe get accepted, I was thinking it would be nice if this
pre-commit-hooks
repo had a hook where you could just specify a generic command.Maybe it could behave similar to something like Bash's xargs. Maybe even give the hook the id of
xargs
?Example:
The text was updated successfully, but these errors were encountered: