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

Diff parser fails with binary files in git diff output #41

Open
rtrv opened this issue Apr 3, 2018 · 1 comment
Open

Diff parser fails with binary files in git diff output #41

rtrv opened this issue Apr 3, 2018 · 1 comment

Comments

@rtrv
Copy link

rtrv commented Apr 3, 2018

We use the gem and it started to fail CI after addition of some PDF files. Is there a way to exclude files or better file types by configuration before diff parser does its matching logic?

The simple workaround could be to add excluded_files option and use it inside git_diff(options) like:

args << "-- . #{options.excluded_files.map { |file| ":(exclude)#{file}" }.join(' ')}"
@jaynetics
Copy link

jaynetics commented Mar 24, 2023

i've release a forked gem, rubocop-git2, with some fixes. i couldn't reproduce this particular issue, but if you encounter it, feel free to submit an issue at https://github.com/jaynetics/rubocop-git2/issues

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