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 #5956] Make Layout/AccessModifierIndentation work with dynamic modules #6573

Merged
merged 4 commits into from Dec 23, 2018
Merged

[Fix #5956] Make Layout/AccessModifierIndentation work with dynamic modules #6573

merged 4 commits into from Dec 23, 2018

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Dec 12, 2018

Fixes #5956.

This PR fixes the Layout/AccessModifierIndentation cop to play nice with dynamic module or class definitions.


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.

@deivid-rodriguez deivid-rodriguez changed the title [Fix #6573] Access modifier indentation with dynamic modules [Fix #5956] Access modifier indentation with dynamic modules Dec 12, 2018
It fits better in there an it also make it possible to reuse the method
in places where `ConfigurableEnforcedStyle` has been separatedly mixed
in.
And move `effective_colum` under the "private note".
Use `end`'s indentation as the base indentation, which is more robust
since it also plays nice with dynamic module or class definitions.
@deivid-rodriguez deivid-rodriguez changed the title [Fix #5956] Access modifier indentation with dynamic modules [Fix #5956] Make Layout/AccessModifierIndentation work with dynamic modules Dec 18, 2018
@bbatsov bbatsov merged commit c40e683 into rubocop:master Dec 23, 2018
@deivid-rodriguez deivid-rodriguez deleted the access_modifier_indentation_with_dynamic_modules branch December 23, 2018 21:40
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/AccessModifierIndentation requires odd indentations
2 participants