We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In #2885, auto-correct functionality was added to Style/OneLineConditional, but it needs tweaking. @lumeet will you take a look?
Style/OneLineConditional
if ARGV.size > 0 then puts 'a' else puts 'b' end
auto-corrected to
ARGV.size > 0 ? (puts 'a') : (puts 'b')
or possibly that no change is made in complicated cases where the AST would be changed.
ARGV.size > 0 ? puts 'a' : puts 'b'
which is a syntax error.
rubocop -a file.rb
$ rubocop -V 0.38.0 (using Parser 2.3.0.6, running on ruby 2.3.0 x86_64-linux)
and also current master, 7d10599.
The text was updated successfully, but these errors were encountered:
15a76ef
Merge pull request #2951 from lumeet/2950_fix_correct_one_line_condit…
f9d8aff
…ional [Fix #2950] Fix correcting in OneLineConditional
No branches or pull requests
In #2885, auto-correct functionality was added to
Style/OneLineConditional
, but it needs tweaking.@lumeet will you take a look?
Expected behavior
auto-corrected to
or possibly that no change is made in complicated cases where the AST would be changed.
Actual behavior
auto-corrected to
which is a syntax error.
Steps to reproduce the problem
rubocop -a file.rb
RuboCop version
and also current master, 7d10599.
The text was updated successfully, but these errors were encountered: