rubocop-git icon indicating copy to clipboard operation
rubocop-git copied to clipboard

Diff parser fails with binary files in git diff output

Open rtrv opened this issue 7 years ago • 1 comments

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(' ')}"

rtrv avatar Apr 03 '18 10:04 rtrv

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

jaynetics avatar Mar 24 '23 22:03 jaynetics