-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make buildifier run on changed files only, not all files #1
base: master
Are you sure you want to change the base?
Conversation
It's not necessary, since "buildifier" can be configured in .pre-commit-hooks.yaml. Furthermore, it shouldn't be run on all files, just the changed ones.
Make buildifier use 'system' language - it doesn't need to be a script (since buildifier should be run on the changed files, not all files).
Thanks a lot for creating this Pre-Commit rule for BUILD files! |
Hi @FelixSeptem, any time to review this? Happy to make changes as necessary! |
Another reason this is worthwhile is because your |
FWIW I put this up at https://github.com/camusenergy/pre-commit-hooks Ideally I'd set up a Docker so that it automatically fetches buildifier, but that's beyond me for the moment. |
Thanks @jlebar! |
Pinging @FelixSeptem to determine if this is planned on being merged |
Submitted a duplicate of my fix in #3 to @jlebar's repo here: jlebar/pre-commit-hooks#1 |
Pre-Commit will pass the list of changed files that match the rule's pattern. This means the script isn't needed, and the rule can use the 'system' language.