-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 #3394] Separate Array & Hash Literal Comma configuration #5307
Merged
bbatsov
merged 2 commits into
rubocop:master
from
garettarrowood:separate_trailing_comma_in_literal_cop
Dec 27, 2017
Merged
[Fix #3394] Separate Array & Hash Literal Comma configuration #5307
bbatsov
merged 2 commits into
rubocop:master
from
garettarrowood:separate_trailing_comma_in_literal_cop
Dec 27, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
garettarrowood
commented
Dec 24, 2017
@@ -40,35 +40,17 @@ module Style | |||
# 1, | |||
# 2 | |||
# ] | |||
class TrailingCommaInLiteral < Cop | |||
include ArraySyntax |
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.
ArraySyntax
was getting unnecessarily included.
👍 |
b2d6e7c
to
6678924
Compare
kevin-j-m
added a commit
to TheGnarCo/gnar-style
that referenced
this pull request
Mar 5, 2018
Rubocop 0.53.0 created two new cops for controlling trailing comma style preferences for commas and hashes which may be found here: rubocop/rubocop#5307. This removes the `Style/TrailingCommaInLiteral` cop in favor of these more granular cops. As a result of this change, gnar-style needs to be updated to use the new cops and remove the use of the old one. This updates to use the new cops and updates the gemspec to reflect that this now requires 0.53 of rubocop in this version to adhere to the available cops.
kevin-j-m
added a commit
to TheGnarCo/gnar-style
that referenced
this pull request
Mar 5, 2018
Rubocop 0.53.0 created two new cops for controlling trailing comma style preferences for arrays and hashes which may be found here: rubocop/rubocop#5307. This removes the `Style/TrailingCommaInLiteral` cop in favor of these more granular cops. As a result of this change, gnar-style needs to be updated to use the new cops and remove the use of the old one. This updates to use the new cops and updates the gemspec to reflect that this now requires 0.53 of rubocop in this version to adhere to the available cops.
firewalker06
added a commit
to cookpad/global-style-guides
that referenced
this pull request
Mar 29, 2018
`Style/TrailingCommaInLiteral` has been splitted into `Style/TrailingCommaInArrayLiteral` & `Style/TrailingCommaInHashLiteral` rubocop/rubocop#5307
kibitan
added a commit
to kibitan/mastodon
that referenced
this pull request
May 10, 2018
RuboCop doesn't work by following error. ``` $ rubocop Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead. (obsolete configuration found in .rubocop.yml, please update it) ``` it comes from RuboCop 0.53.0 [\[Fix mastodon#3394\] Separate Array & Hash Literal Comma configuration by garettarrowood · Pull Request mastodon#5307 · bbatsov/rubocop](rubocop/rubocop#5307)
Gargron
pushed a commit
to mastodon/mastodon
that referenced
this pull request
Jun 4, 2018
* fix RuboCop error RuboCop doesn't work by following error. ``` $ rubocop Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead. (obsolete configuration found in .rubocop.yml, please update it) ``` it comes from RuboCop 0.53.0 [\[Fix #3394\] Separate Array & Hash Literal Comma configuration by garettarrowood · Pull Request #5307 · bbatsov/rubocop](rubocop/rubocop#5307) * ci(CodeClimate): specify RuboCop version 0.54 * https://docs.codeclimate.com/docs/rubocop#section-using-rubocop-s-newer-versions * [RuboCop 0.55.0 is not available yet](codeclimate/codeclimate-rubocop#121) on CodeClimate rubocop channel
lawremipsum
pushed a commit
to lawremipsum/mspsocial-mastodon
that referenced
this pull request
Jul 7, 2018
* fix RuboCop error RuboCop doesn't work by following error. ``` $ rubocop Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead. (obsolete configuration found in .rubocop.yml, please update it) ``` it comes from RuboCop 0.53.0 [\[Fix mastodon#3394\] Separate Array & Hash Literal Comma configuration by garettarrowood · Pull Request mastodon#5307 · bbatsov/rubocop](rubocop/rubocop#5307) * ci(CodeClimate): specify RuboCop version 0.54 * https://docs.codeclimate.com/docs/rubocop#section-using-rubocop-s-newer-versions * [RuboCop 0.55.0 is not available yet](codeclimate/codeclimate-rubocop#121) on CodeClimate rubocop channel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3394 by splitting
Style/TrailingCommaInLiteral
intoStyle/TrailingCommaInArrayLiteral
&Style/TrailingCommaInHashLiteral
. Users can now configure each datatype however they please.The splitting process was made easy because its tests isolated either hashes OR arrays. All tests from
Style/TrailingCommaInLiteral
were moved into these new test files.Since this adds two new cops and the next release is slated to be a patch, I have not updated the CHANGELOG.md. When the time comes, I will attend to the last checkbox.
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).and description in grammatically correct, complete sentences.
rake default
orrake parallel
. It executes all tests and RuboCop for itself, and generates the documentation.