-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update rubocop #1560
Update rubocop #1560
Conversation
@@ -1,7 +1,7 @@ | |||
module ActiveModelSerializers | |||
module Adapter | |||
UnknownAdapterError = Class.new(ArgumentError) | |||
ADAPTER_MAP = {} | |||
ADAPTER_MAP = {} # rubocop:disable Style/MutableConstant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop changed this to:
ADAPTER_MAP = {}.freeze
which prevent us to modify the hash at line 52 and thus breaks the gem/tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
womp wmp |
Weird, rubocop is green locally 😕 |
Ah found it, it was |
@bf4 What do you think about pinning the rubocop version? |
Depends if it's broken and causing trouble or just different B mobile phone
|
I assume new cops are added every few versions so if the version is not fixed, then we might run into new cops every now and then, making the build fail. |
Enabled: false | ||
|
||
Style/DotPosition: | ||
EnforcedStyle: trailing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs rebase -- as long as the checks pass, I'm good with merging. |
EnforcedStyle: semantic | ||
|
||
Style/TrailingCommaInLiteral: | ||
EnforcedStyleForMultiline: consistent_comma |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the trailing comma what all the cool kids do these days? https://github.com/rails-api/active_model_serializers/pull/1560/files#diff-57dc91570125bb0a036a83a5c8bd6be8R63
Usually I'm fine with it being allowed, not necessarily required, as is a habit I picked up from Python for this. I'm curious if others have any strong opinion here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm personally not a fan of the trailing comma. But I guess if that's what the standard is now a days...
Sounds like the team prefers the SomeClass.awesome_sauce
.do_things The team also prefers to not enforce a trailing comma. |
Rebased and updated with the style fix. |
👍 |
I'm good with this. |
do we want to merge anything before we merge this, as it could cause conflicts in other PRs? |
@NullVoxPopuli good point here. IMO, it would be easier to merge this first and update the other PR as this one is pretty big. |
Purpose
Rebase #1498
Related GitHub issues
Closes #1498
Additional helpful information
@bf4 @remear here you go 😄 Just need to update the trailling/leading dot and add a CHANGELOG. Anything else missing?