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

[Fix #10764] Fix performance issue for Layout/FirstHashElementIndentation and Layout/FirstArrayElementIndentation #10777

Commits on Jun 30, 2022

  1. [Fix rubocop#10764] Fix performance issue for Layout/FirstHashElement…

    …Indentation and Layout/FirstArrayElementIndentation
    
    Fixes rubocop#10764.
    
    In rubocop v1.31.0, `MultilineElementIndentation` that is used by `Layout/FirstHashElementIndentation` and `Layout/FirstArrayElementIndentation` walks all nodes through in the code to find a hash pair node where its value part begins with the given left-brace; That computation is expensive, so I made a change so that the hash pair is passed by each class that includes `MultilineElementIndentation`.
    j-miyake committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    d5c49f9 View commit details
    Browse the repository at this point in the history