rubocop-git
rubocop-git copied to clipboard
Incorrect exit code if there isn't any offenses detected
When I run the following command, and it says no offenses detected but the exit code is 1.
$ bundle exec rubocop-git origin/master HEAD
12 files inspected, no offenses detected
$ echo $?
1
rubocop-git version:
$ rubocop-git -v
0.1.3
rubocop version:
$ rubocop -v
0.52.1
ruby version:
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin17]
After some debugging, I figured out that this is the cause of the issue:
# rubocop:disable Metrics/BlockLength
This could be fixed for me if #33 is merged, since I just can disable the cop for the whole spec directory.
However, I think this should be fixed later, so it also supports comments to disable/enable cops.
if anyone is still using this, i've release a forked gem, rubocop-git2, with this and other fixes included