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
merged 1 commit into from Mar 19, 2020

Conversation

koic
Copy link
Member

@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
Collaborator

@bbatsov bbatsov left a comment

Choose a reason for hiding this comment

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

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 merged commit 8633992 into rubocop:master Mar 19, 2020
@koic koic deleted the add_case_match_node branch March 19, 2020 11:43
@Rukomoynikov
Copy link

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
Labels
None yet
Projects
None yet
Development

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