-
Notifications
You must be signed in to change notification settings - Fork 75
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
Fail running rubocop step if rubocop command itself fails #60
Comments
The problem here is we can't fail the step on any rubocop error status. When rubocop detects offenses, it also returns error status. |
Can you recreate the situation "If rubocop command itself fails, e.g. because of incorrect rubocop config, the step is considered successful."? I tried with the incorrect rubocop config, but it failed as expected.
I think It's not as if this action doesn't work as expected because of the presence of pipe (|) operator. |
@wafuwafu13 thank you a lot for your help. You are right So, I'm closing the issue. |
It looks the issue was fixed by https://github.com/reviewdog/action-rubocop/pull/48/files#diff-116b4e2bac3e35befdfae3f3b6eb88911689c30bfe6696d9e6b0139da8cb5e72R95-R96 (switching from rubocop to rdjson formatter). |
thank you for your imformation :-) |
If
rubocop
command itself fails, e.g. because of incorrect rubocop config, the step is considered successful. The error or rubocop command is ignored because of the following pipe (|
) operator: https://github.com/reviewdog/action-rubocop/blob/master/script.sh#L96.Can we fail the step in such case? Otherwise we risk to get not pleasant situation: the checks are green, we think our code is correct, but actually the code is not even checked.
The text was updated successfully, but these errors were encountered: