Skip to content
New issue

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

Preserve multiline semantics on Style/SymbolArray and Style/WordArray #10784

Merged
merged 1 commit into from Jul 7, 2022

Commits on Jul 4, 2022

  1. Preserve multiline semantics on Style/SymbolArray and `Style/WordAr…

    …ray`
    
    To fix rubocop#10455.
    
    Note that this commit also changes the offense message like this:
    
    ```ruby
    \# Before
    %w(
    ^^^ Use `[
      'foo',
      'bar'
    ]` for an array of words.
      foo
      bar
    )
    
    \# After
    %w(
    ^^^ Use `[...]` for an array of words.
      foo
      bar
    )
    ```
    
    This means that the auto-corrected code no longer appears in the offense message.
    I think this is a reasonable change because the message to enforce the percent styles (`'Use `%w` or `%W` for an array of words.'`) is already using this format.
    r7kamura committed Jul 4, 2022
    Copy the full SHA
    074f294 View commit details
    Browse the repository at this point in the history