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
Auto-linting bug on $? and $CHILD_STATUS #4097
Comments
I'm guessing you failed to add |
I would argue that this shouldn't be an auto-corrected change. This project should strive to cause zero breakage when auto-correcting. |
Just experienced this same issue in an automation script which sent out incorrect notifications as a result of this auto-corrected change. As a longtime user of rubocop I've come to feel very safe in using the -a flag to resolve issues without breaking the code; so it came as very large surprise that the automatic change actively broke my script rather than just telling me what I'd need to fix the issue like other cops that have the potential of breaking functionality. |
Could we mark I also opened #8156 |
I think we should aim for |
This is an incredibly annoying issue. |
PR welcome to add the |
Note: cop has been marked as unsafe, so current RuboCop will not autocorrect it with |
I have a branch in the works to add the |
When replacing short global variables with descriptive aliases from English stdlib module, ensure English module is required. Adds a new configuration `RequireEnglish` (default `true`) for `Style/SpecialGlobalVars` cop. When enabled, this will add a `require 'English'` statement if not already present at the top of the file.
The autolinter currently changes $? to $CHILD_STATUS, which breaks on ruby-2.4.0. Maybe $CHILD_STATUS has been removed and/or is deprecated.
The text was updated successfully, but these errors were encountered: