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

Warning: unrecognized cop always exits with code 0 #7231

Closed
coorasse opened this issue Jul 25, 2019 · 1 comment
Closed

Warning: unrecognized cop always exits with code 0 #7231

coorasse opened this issue Jul 25, 2019 · 1 comment
Labels

Comments

@coorasse
Copy link
Contributor

Expected behavior

When a warning Warning: unrecognized cop is raised we expect to exit with status code 1.

Actual behavior

rubocop exits with code 0.

Using rubocop --fail-level=warning or Lint: Severity: warning option has no effect.

Steps to reproduce the problem

mkdir test-rubocop
cd test-rubocop
echo "Syntax/Whatever:\n  Enabled: true" > .rubocop.yml
rubocop
echo $?

0 is printed, 1 should be printed because a warning is raised.

RuboCop version

0.73.0

@Drenmi
Copy link
Collaborator

Drenmi commented Aug 25, 2019

It makes sense that rubocop --fail-level=warning should include this.

@koic koic closed this as completed in ff811f0 Dec 4, 2019
koic added a commit that referenced this issue Dec 4, 2019
…_warning_does_not_exit_with_1

Fix #7231 unknown cop in config file will exit with code 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants