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

rubocop --auto-gen-conf exits with 1 #6057

Closed
Ana06 opened this issue Jun 28, 2018 · 3 comments · Fixed by #6165
Closed

rubocop --auto-gen-conf exits with 1 #6057

Ana06 opened this issue Jun 28, 2018 · 3 comments · Fixed by #6165
Labels
bug good first issue Easy task, suitable for newcomers to the project

Comments

@Ana06
Copy link
Contributor

Ana06 commented Jun 28, 2018

When rubocop find offenses it exits with 1, which in general is expected. But when running rubocop --auto-gen-conf I would expect that it returns 1 only if something went wrong and 0 in other case, as that there are offenses is expected and doesn't mean that the execution of the command went wrong. 😕

@bbatsov bbatsov added bug good first issue Easy task, suitable for newcomers to the project labels Jun 28, 2018
@MagedMilad
Copy link
Contributor

@Ana06 @bbatsov I would like to contribute solving this issue, but I think returning 0 when there are offenses will cause many tests to fail, so should I can those tests to always expect 0 when --auto-gen-conf option is present?

@Ana06
Copy link
Contributor Author

Ana06 commented Aug 7, 2018

@MagedMilad nice that you want to work on that! 💘 I think --auto-gen-conf should return 0 when the todo file is successfully created, without taking into account if there are offenses and the tests should also be changed to follow this.

@MagedMilad
Copy link
Contributor

@Ana06 @bbatsov just made a Pull request #6165, But I can't assign a reviewer to it, also I'm not sure this is the right way to handle auto-gen-config because it's my first time contributing in rubocop
so any comment on the PR will be very appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Easy task, suitable for newcomers to the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants