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 #10436] Fix an error for Style/SoleNestedConditional raises exception when inspecting if ... end if ... #10447

Merged
merged 1 commit into from Mar 11, 2022

Conversation

ydah
Copy link
Member

@ydah ydah commented Mar 9, 2022

Fixes #10436.

This PR fixes an error for Style/SoleNestedConditional when code like the following:

if foo
  do_something
end if bar

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 changed the title [Fix rubocop#10436] Fix an error for Style/SoleNestedConditional raises exception when inspecting if ... end if ... [Fix #10436] Fix an error for Style/SoleNestedConditional raises exception when inspecting if ... end if ... Mar 9, 2022
@ydah ydah force-pushed the fix-style-sole-nested-conditional branch 2 times, most recently from 3cfdcae to 2367fe1 Compare March 9, 2022 18:09
@ydah ydah marked this pull request as ready for review March 9, 2022 18:19
CHANGELOG.md Outdated Show resolved Hide resolved
…ises exception when inspecting `if ... end if ...`
@ydah ydah force-pushed the fix-style-sole-nested-conditional branch from 2367fe1 to 5ce8bb9 Compare March 11, 2022 07:05
@ydah
Copy link
Member Author

ydah commented Mar 11, 2022

I updated this PR. Thanks a lot!

@ydah ydah requested a review from koic March 11, 2022 07:13
@koic koic merged commit f9ef49f into rubocop:master Mar 11, 2022
@koic
Copy link
Member

koic commented Mar 11, 2022

Nice! Thank you for the fixing!

@ydah ydah deleted the fix-style-sole-nested-conditional branch March 11, 2022 08:00
koic added a commit to rubocop/docs.rubocop.org that referenced this pull request Mar 23, 2022
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.

Style/SoleNestedConditional raises exception when inspecting unless ... end if ...
2 participants