-
Notifications
You must be signed in to change notification settings - Fork 900
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 Rubocop TrailingCommaInLiteral issue at UI build #17327
Fix Rubocop TrailingCommaInLiteral issue at UI build #17327
Conversation
cc @bdunne |
Gemfile
Outdated
gem "haml_lint", "~>0.20.0", :require => false | ||
gem "rubocop", "~>0.52.1", :require => false | ||
gem "haml_lint", "~>0.20.0", :require => false | ||
gem "rubocop", ">=0.52.1", "<0.53.0", :require => false |
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.
What's wrong with ~>0.52.1
?
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.
@bdunne It will handle the major version only, so 0.x.x
. But the breaking change happened at a minor version and we should change only the patch number, 0.52.x
.
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.
Another solution is to update the config file at guides repo (it is done in my machine, just tell me and I will submit the PR) and use ~>0.53.0
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.
It will handle the major version only, so 0.x.x.
No, ~>
only allows the last specified part to float. So with x.y.z, x and y are fixed and z is the minimum.
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.
@bdunne Hum... you're right. I read the documentation again and it is exactly as you said. For some reason Scrutinizer is using Rubocop 0.55. I do not have access to that, but I will try to figure out if there is another solution. In the meantime, is it a problem to update the rules to use 0.53.x
?
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 not opposed to updating it as long as the config files and requirements are updated in all of the repos.
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.
@bdunne Ok. Give me some time and I will update here and push the merge request at guides repository. On the other hand, according to the Scrutinizer docs the gem at Gemfile should have worked... Anyway, I agree that updating will solve the problem.
928920f
to
131fc20
Compare
131fc20
to
40a33c7
Compare
Checked commit saulotoledo@40a33c7 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@bdunne, what do you think about the current solution? I updated the configuration at ManageIQ/guides#303 . |
Is there any reason we can't just make the leap to the latest |
@NickLaMuro I added the version 0.53.0 because is the smaller version number that supports the rules we are using. @bdunne, what do you think about? |
This pull request has been automatically closed because it has not been updated for at least 6 months. Feel free to reopen this pull request if these changes are still valid. Thank you for all your contributions! |
@agrare @bdunne I believe we should keep this open. We had related news yesterday at ManageIQ/miq_bot#432 I do not have access here to reopen, but I will try to do it later. |
At version
0.53.0
, theTrailingCommaInLiteral
rule at Rubocop has been split intoTrailingCommaInHashLiteral
andTrailingCommaInArrayLiteral
and no longer exists. The current version definition for Rubocop allow us to use the version0.52.1
or superior, but it is not possible to have both versions by having that options in yourrubocop.yml
file.In order to use the new updated rules, this PR updates the current rubocop version to
0.53.0
.