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

Removes Include configuration values #22

Merged
merged 1 commit into from Jan 29, 2019
Merged

Removes Include configuration values #22

merged 1 commit into from Jan 29, 2019

Conversation

jbilbo
Copy link
Member

@jbilbo jbilbo commented Jan 29, 2019

Since 0.57 Include overwrites the hardcoded defaults. All values here are already included in the defaults, so no point in defining them here anymore.

Also:

  • SpaceInsideHashLiteralBraces now belongs to Layout instead of Style
  • Disable new added cop Style/AccessModifierDeclarations. We use inline declarations (private :foo :bar) as default in our codebase.

Since 0.57 `Include` overwrites the hardcoded defaults. All values here
are already included in the defaults, so no point in defining them here
anymore.

Also:
- `SpaceInsideHashLiteralBraces` now belongs to `Layout` instead of
`Style`
- Disable new added cop `Style/AccessModifierDeclarations`. We use
inline declarations (`private :foo :bar`) as default in our codebase.
## 1.5.1
- [FIX] Remove `Include` values. Since 0.57 `Include` overwrites the hardcoded defaults. All values here are already included in the defaults, so no point in defining them here anymore.
- [FIX] `SpaceInsideHashLiteralBraces` now belongs to `Layout` instead of `Style`
- [FIX] Disabling new added cop `Style/AccessModifierDeclarations`. We use inline declarations (`private :foo :bar`) as default in our codebase.
Copy link

Choose a reason for hiding this comment

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

I don't think we should disable this, we can choose the enforced style: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/AccessModifierDeclarations

Copy link
Member Author

Choose a reason for hiding this comment

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

I've disabled it because I think this cop needs more work. I wouldn't encourage declarations like:

class Foo

  private def bar; end
  private def baz; end

end

but at the same time, we're using another type of inline declarations that the cop puts all in the same bag like:

class Client
  attr_reader :uri
  private :uri
end

There's an ongoing discussion about this right now, also affecting other methods like module_function:

rubocop/rubocop#5953
rubocop/rubocop#6032

That's why I think it's better to disable this cop for now.

@jbilbo jbilbo merged commit f455f22 into master Jan 29, 2019
@jbilbo jbilbo deleted the fix-release branch January 29, 2019 13:44
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

3 participants