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 #10958] Fix an infinite loop for Layout/SpaceInsideBlockBraces when multiline block #10959

Merged
merged 1 commit into from Aug 26, 2022

Conversation

ydah
Copy link
Member

@ydah ydah commented Aug 24, 2022

Fix: #10958


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@ydah ydah force-pushed the fix_space_inside_block_braces branch from c27c14e to 1f060e7 Compare August 25, 2022 07:02
@ydah ydah force-pushed the fix_space_inside_block_braces branch from 1f060e7 to 34a1fcc Compare August 25, 2022 07:10
@@ -0,0 +1 @@
* [#10958](https://github.com/rubocop/rubocop/issues/10958): Fix an infinite loop for `Layout/SpaceInsideBlockBraces`. ([@ydah][])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a more bit explanation about the context of this error?

@ydah ydah force-pushed the fix_space_inside_block_braces branch from 34a1fcc to 6455981 Compare August 25, 2022 07:14
@ydah ydah changed the title [Fix #10958] Fix an infinite loop for Layout/SpaceInsideBlockBraces [Fix #10958] Fix an infinite loop for Layout/SpaceInsideBlockBraces when multiline block Aug 25, 2022
@ydah ydah force-pushed the fix_space_inside_block_braces branch from 5281966 to 7f3c2dc Compare August 25, 2022 07:18
bar
]}
^{} Space inside } detected.
RUBY
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add expect_correction code? It looks like InfiniteCorrectionLoop error is not resolved.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops, I added it. Thank you.

@ydah ydah force-pushed the fix_space_inside_block_braces branch from 7f3c2dc to 7ad6dd1 Compare August 26, 2022 05:44
…Braces` when `EnforcedStyle` is `no_space` and using multiline block

Fix: rubocop#10958
@ydah ydah force-pushed the fix_space_inside_block_braces branch from 7ad6dd1 to 6a8b7e9 Compare August 26, 2022 05:45
@ydah ydah requested a review from koic August 26, 2022 05:46
@koic koic merged commit 40381f1 into rubocop:master Aug 26, 2022
@ydah ydah deleted the fix_space_inside_block_braces branch August 26, 2022 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layout/SpaceInsideBlockBraces infinite loop, but corrected everything?
2 participants