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
…dConditional`
Fixesrubocop#9750.
This PR fixes an incorrect auto-correct for `Style/SoleNestedConditional`
when when using nested `if` within `unless foo == bar`.
This patch leaves auto-correction from `(!foo == bar)` to `foo != bar` to
`Style/InverseMethods` cop thus simplify its role and implementation.
And this PR adds a cli test to prevent unintended auto-correction when using
`Style/IfUnlessModifier` together for the patch.
Style/SoleNestedConditional
generates incorrect ruby when fixing this:Expected behavior
Actual behavior
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: