You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running rubocop -a on the following code, it autocorrects it to something syntactically wrong.
if condition
array << device if (deviceArray1 + deviceArray2 + deviceArray3).exclude? device
end
Result:
if condition && (deviceArray1 + deviceArray2 + deviceArray3).exclude? device
array << device
end
RuboCop even throws an error in Lint/Syntax on the newly corrected line, so it is obviously a wrong correction. The correction stems from Style/SoleNestedConditional
Expected behavior
Not to make my code syntactically wrong. Maybe add brackets?
When running
rubocop -a
on the following code, it autocorrects it to something syntactically wrong.Result:
RuboCop even throws an error in Lint/Syntax on the newly corrected line, so it is obviously a wrong correction. The correction stems from Style/SoleNestedConditional
Expected behavior
Not to make my code syntactically wrong. Maybe add brackets?
Actual behavior
A wrong autocorrection
RuboCop version
The text was updated successfully, but these errors were encountered: