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

Support Ruby 2.7's pattern match for Layout/ElseAlignment cop #7786

merged 1 commit into from Mar 19, 2020


Copy link

@koic koic commented Mar 9, 2020

Closes #7624 and #7774.

This PR supports pattern match for Layout/ElseAlignment cop.
Also this resolves the crash reported in #7624 and #7774 for using Ruby 2.7's pattern match.

Before submitting the PR make sure the following are checked:

  • 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.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

Copy link

@bbatsov bbatsov left a comment

Great work!

Closes rubocop#7624 and rubocop#7774.

This PR supports pattern match for `Layout/ElseAlignment` cop.
Also this resolves the crash reported in rubocop#7624 and rubocop#7774 for
using Ruby 2.7's pattern match.
@koic koic force-pushed the add_case_match_node branch from e82a4a7 to d62e023 Compare Mar 19, 2020
@koic koic merged commit 8633992 into rubocop:master Mar 19, 2020
25 checks passed
@koic koic deleted the add_case_match_node branch Mar 19, 2020
Copy link

Rukomoynikov commented Jul 5, 2022

Thank you very much for you work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Rubocop brakes on 2.7 pattern matching AST nodes while tree walking, as they children may be nil
3 participants