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

Incorrect exit code if there isn't any offenses detected #38

Open
madslundholmdk opened this issue Feb 9, 2018 · 2 comments
Open

Incorrect exit code if there isn't any offenses detected #38

madslundholmdk opened this issue Feb 9, 2018 · 2 comments

Comments

@madslundholmdk
Copy link

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]
@madslundholmdk
Copy link
Author

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.

@jaynetics
Copy link

jaynetics commented Mar 24, 2023

if anyone is still using this, i've release a forked gem, rubocop-git2, with this and other fixes included

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