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

Infinite loop detected in /Users/dorianmariefr/src/pipelines/a.rb and caused by Layout/ArrayAlignment, Layout/AssignmentIndentation #517

Open
dorianmariecom opened this issue Feb 4, 2023 · 3 comments · Fixed by rubocop/rubocop#11537 or rubocop/rubocop#12877

Comments

@dorianmariecom
Copy link

Hi,

I found an error in standardrb with this code:

config.cache_store =
    :redis_cache_store,
    {url: ENV.fetch("REDIS_URL", "redis://localhost:6379")}

standardrb v1.22.1

@koic
Copy link
Contributor

koic commented Feb 4, 2023

This is a RuboCop's bug. I've opened rubocop/rubocop#11537 to solve the error.

koic added a commit to koic/rubocop that referenced this issue Feb 4, 2023
Fixes standardrb/standard#517.

This PR fixes an infinite loop error for `Layout/ArrayAlignment`
when using assigning unbracketed array elements.
@zhengpd
Copy link

zhengpd commented Apr 30, 2024

@koic Infinite loop error with following code:

cask "squirrel" do
  uninstall pkgutil: [
    "com.googlecode.rimeime.Squirrel.pkg", # Package name of older versions (< 0.10.0)
    "im.rime.inputmethod.Squirrel"
            ],
    delete: "/Library/Input Methods/Squirrel.app"
end
  • standardrb --fix code.rb
  • standardrb --version => 1.35.1
  • rubocop --version => 1.62.1

koic added a commit to koic/rubocop that referenced this issue Apr 30, 2024
Fixes standardrb/standard#517 (comment).

This PR fixes an infinite loop error for `Layout/FirstArgumentIndentation`
when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArrayAlignment`.
@koic
Copy link
Contributor

koic commented Apr 30, 2024

@zhengpd Thanks for the feedback. I've opened rubocop/rubocop#12877 to solve the infinite loop error.

koic added a commit to koic/rubocop that referenced this issue Apr 30, 2024
Fixes standardrb/standard#517 (comment).

This PR fixes an infinite loop error for `Layout/FirstArgumentIndentation`
when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArrayAlignment`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants