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#10920.
This PR fixes an incorrect autocorrect for `Style/SoleNestedConditional`
when using nested conditional and branch contains a comment.
It removes `return if config.for_cop('Style/IfUnlessModifier')['Enabled']` that introduced in rubocop#9195.
That logic is now unnecessary due to rubocop@3fea162 change.
When rubocop autocorrect detects
Style/NestedConditional
with a comment before and after, it inadvertantly deletes the trailing comment.Steps to reproduce the problem
test.rb
rubocop -a test.rb
test.rb
RuboCop version
Both 1.32 and 1.35
The text was updated successfully, but these errors were encountered: