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

Rename enforced style for Layout/IndentationConsistency #7163

Merged

Conversation

koic
Copy link
Member

@koic koic commented Jun 22, 2019

Follow up #7113 (comment).

This PR renames enforced style for Layout/IndentationConsistency from EnabledStyle: outdented_access_modifiers to EnabledStyle: indented_internal_methods.

Here is an example style that the name indented_internal_methods represents:

# good
class Foo
  def bar
  end

  private
    def baz
    end
end

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.

Follow up rubocop#7113 (comment).

This PR renames enforced style for `Layout/IndentationConsistency` from
`EnabledStyle: outdented_access_modifiers` to `EnabledStyle: indented_internal_methods`.

Here is an example style that the name `indented_internal_methods` represents:

```ruby
# good
class Foo
  def bar
  end

  private
    def baz
    end
end
```
@bbatsov bbatsov merged commit 936f40b into rubocop:master Jun 22, 2019
@bbatsov
Copy link
Collaborator

bbatsov commented Jun 22, 2019

👍

@koic koic deleted the rename_enforced_style_for_indentation_consistency branch June 22, 2019 21:15
sue445 added a commit to sue445/onkcop that referenced this pull request Jun 25, 2019
`EnforcedStyle: rails` is renamed to `EnforcedStyle: indented_internal_methods` since rubocop v0.72.0

```
$ bundle exec rubocop -P
Error: obsolete `EnforcedStyle: rails` (for Layout/IndentationConsistency) found in vendor/bundle/ruby/2.6.0/bundler/gems/onkcop-6256494c1f86/config/rubocop.yml
`EnforcedStyle: rails` has been renamed to `EnforcedStyle: indented_internal_methods`
```

c.f. rubocop/rubocop#7163
koic added a commit to koic/rails that referenced this pull request Aug 15, 2019
### Summary

RuboCop 0.74.0 has been released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.74.0

And rubocop-0-74 channel is available in Code Climate.
https://github.com/codeclimate/codeclimate/releases/tag/v0.85.5

This PR specifies the same RuboCop Performance (1.3.0) and RuboCop Rails (2.0.0)
versions as Code Climate's Gemfile.lock.
https://github.com/codeclimate/codeclimate-rubocop/blob/channel/rubocop-0-74/Gemfile.lock#L51-L55

Also, the `EnforcedStyle` of `Layout/IndentationConsistency` has been renamed
from `EnforcedStyle: rails` to `EnforcedStyle: indented_internal_methods`

- rubocop/rubocop#7113
- rubocop/rubocop#7163

And this commit disables `Layout/SpaceAroundOperators`
that was changed from RuboCop 0.74 by rubocop/rubocop#7211.

cf. rails#36943 (comment)
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.

None yet

2 participants