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

Fixed alignment source for Layout/RescueEnsureAlignment when using inline access modifiers #6328

Merged
merged 2 commits into from
Oct 22, 2018

Conversation

andrew-aladev
Copy link
Contributor

Closes #6326.

  1. Fixed alignment source for autocorrect and check methods.
  2. Implemented alignment node as a parent node + access modifier (if it exists).
  3. I haven't added any fixed node types like :send. Code requires node only respond to access_modifier?. So it will be easy to add any other inline modifiers in future.
  4. Cosmetics to fit with current project styles.

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 rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@andrew-aladev andrew-aladev changed the title Fixed alignment source for Layout/RescueEnsureAlignment when using line access modifiers Fixed alignment source for Layout/RescueEnsureAlignment when using inline access modifiers Sep 24, 2018
@andrew-aladev
Copy link
Contributor Author

Closes #6313.

@andrew-aladev
Copy link
Contributor Author

Sorry, I was very busy this week. I will update it today.

…nment when using inline access modifiers (rubocop#6326)

[Fix rubocop#6326] added tests for inline expressions before rescue and ensure, cosmetics (rubocop#6326)
@andrew-aladev
Copy link
Contributor Author

andrew-aladev commented Oct 10, 2018

I've removed merge commits and squashed it in single commit again. Ok? Done. Please review.

@iGEL
Copy link
Contributor

iGEL commented Oct 19, 2018

Looks fine to me ❤️

@a14m
Copy link

a14m commented Oct 22, 2018

Thanks a lot for the work, are we expecting this to soon be merged and released?
Thanks again for the awesome work 👍

@bbatsov bbatsov merged commit c77387c into rubocop:master Oct 22, 2018
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/RescueEnsureAlignment broken in new releases 0.59.x
6 participants