rubocop-git
rubocop-git copied to clipboard
Diff parser fails with binary files in git diff output
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(' ')}"
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