-
-
Notifications
You must be signed in to change notification settings - Fork 767
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
Print actual files being fixed by hooks #681
Comments
One option that might help today (without any changes) -- there's a Ideally, Here's the original PR which added this btw: #305 |
(also (shameless plug) you may find |
OK, I'll do a PR in isort and hope it will be integrated. I agree that it should be in isort anyway. I actually started looking at reorder_python_import first, but then switched to isort due to asottile/reorder-python-imports#8 |
Cool, if you want any help working on isort I've poked their codebase a few times and might be able to help with a PR :) |
That's very nice of you but I was interested in implementing that (minor) feature. I just opened a PR in isort, let's see if it gets accepted |
Hi,
First of all thanks for pre-commit, it's awesome!
While running isort as a hook, I noticed that it wasn't printing the files being fixed which isn't handy IMO. I could do a PR in isort but I thought it could be integrated in pre-commit. In fact, the current behaviour is that it prints "Files were modified by this hook. Additional output:" whenever a hook modifies a file, but it does not print the actual files.
I believe it could be useful to print the files being changed and not relying on the hook to do so. I think I can do that by parsing the output of "git diff --no-ext-diff" and extract filenames. The only issue I see is that it will be redundant with hooks that are printing that already (like autopep8-wrapper). Another option would be to print the modified files only if the hook returned empty stdout/stderr.
Let me know what you think, I'd be happy to work on this. If you don't like it, no problem I'll just do a PR in isort. Thanks!
The text was updated successfully, but these errors were encountered: