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 auto-correcting Style/SafeNavigation offenses of code described below, comments are duplicated and the original comments are not properly indented.
Consider:
ifxx.eachdo# Commentendend
Expected behavior
x&.eachdo# Commentend
Actual behavior
# Commentx&.eachdo# Commentend
Steps to reproduce the problem
Run sample code
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
…Navigation` autocorrection.
Previously, every comment within the source range of the `if` being auto-corrected was captured and moved above the rewritten line. This resulted in comment duplication, as some comments belonged to internal blocks within the if. This change only considers line ranges between internal if blocks as entry points for comments that are allowed to be moved.
…ion` autocorrection.
Previously, every comment within the source range of the `if` being auto-corrected was captured and moved above the rewritten line. This resulted in comment duplication, as some comments belonged to internal blocks within the if. This change only considers line ranges between internal if blocks as entry points for comments that are allowed to be moved.
When auto-correcting
Style/SafeNavigation
offenses of code described below, comments are duplicatedand the original comments are not properly indented.Consider:
Expected behavior
Actual behavior
Steps to reproduce the problem
Run sample code
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:The text was updated successfully, but these errors were encountered: