Skip to content
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

Option to also print diffs when using --in-place #77

Open
verhovsky opened this issue Aug 30, 2020 · 1 comment
Open

Option to also print diffs when using --in-place #77

verhovsky opened this issue Aug 30, 2020 · 1 comment

Comments

@verhovsky
Copy link

I'm running autoflake as a hook with pre-commit:

- repo: https://github.com/myint/autoflake
  rev: v1.4
  hooks:
    - id: autoflake
      args: ['--in-place', '--remove-all-unused-imports', '--ignore-init-module-imports']

When autoflake makes some changes, all it says is that it made some changes:

autoflake................................................................Failed
- hook id: autoflake
- files were modified by this hook

but doesn't say what or where, I have to look at my unstaged files to see what happened. Since it usually doesn't make too many changes, it would be helpful if there was a flag that would print the diff and make the changes.

@graingert
Copy link
Member

@verhovsky pre-commit run --show-diff-on-failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants