-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
-n
option doesn't disable colors
#4168
Comments
It looks like you found the reason for this issue already. It seems like the only options are to split this out so there is a |
I guess another other option could be to remove the |
Yeah, probably this functionality doesn't warrant having short option names at all. |
@bbatsov may I submit PR that removes the short option? |
@sadovnik PRs are always welcome. I don't think anyone has started this work, so I say go for it. |
Agree. Also |
This option was broken in a5ce6d and the community decided to remove it. Here's why: * Nobody used it. It has been broken for over a year before it was noticed it's broken * `-n` is not the most intuitive option for disabling color * There is no plain way to fix it
The latest version of `rubocop` does not support the flag `-n` anymore ([1]). [1]: rubocop/rubocop#4168
The latest version of `rubocop` does not support the flag `-n` anymore ([1]). [1]: rubocop/rubocop#4168
Expected behavior
rubocop -n
runs Rubocop without coloring the output.Actual behavior
Rubocop runs with colors.
Steps to reproduce the problem
rubocop -n
RuboCop version
The cause
Here's what I found out. There was only
--no-color
option, without optional[no-]
part. When--[no-]color
was introduced, the shorthand version of this flag (-n
) wasn't taken into account.a5ce6df#diff-aabedc1d8225971d14fe2ceecc1be1e1
OptionParser just don't knows that
-n
is a negative flag:I suggest to drop this flag.
What do you think?
The text was updated successfully, but these errors were encountered: