-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add an option to return an error code if any files have/should be changed #153
Comments
For use in CI you probably want to use |
I am not using (and currently cannot use) pre-commit ci. Also - i don't want to alter files in my CI (server side, not locally before commits). So i need to get some indication regarding if files were changed, which is AFAIU not currently available from the tool? |
No, this is not currently support. It's not necessary when used as a pre-commit hook, as the default behavior of the hook is to fail if any changes would have been made. What you're asking for I'd probably think of as a Adding this as a feature request to the backlog. |
It would be awesome to have this option. |
Feel like contributing this feature @yliederNY ? :) |
@alonme @yliederNY one of you interested in working on this? |
Hello there! I like the idea of a best! |
@jspaezp Yes, what you describe sounds reasonable to me 👍🏽 |
Also would love this functionality. |
I looked into it but with the current structure it leads to a lot of branching. It is doable but without some refactoring the ending code is very ugly. -> #192 reference (it is off a fairly old branch so it cannot be merged RN but the idea is the same ..) |
Thanks @jspaezp for looking into this! As mentioned on your PR it's unfortunately not currently in a reviewable state. Could you please rebase on the tip of main? |
Just sent a PR with the new main (after the refactor done it was a lot easier to add the feature, thanks for the code cleanup!) |
In order to use this tool in CI, it would be useful if it could return an error code when a file has been changed/ would have been changed (when using dry_run)
The text was updated successfully, but these errors were encountered: