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
proposal: generic subprocess #1037
Comments
is that not what |
Ah, nice, thanks... - repo: local
hooks:
- id: terraform_fmt
name: Terraform fmt
description: Rewrites all Terraform configuration files to a canonical format.
entry: terraform fmt
language: system
files: (\.tf|\.tfvars)$
exclude: \.terraform/.*$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: