-
Notifications
You must be signed in to change notification settings - Fork 437
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
Rubocop friendly cops part 10 #4264
Conversation
I created a separate PR (#4265) for having master without errors. Please remove your last commit, now it will be unneeded. |
LGTM overall, but I have some doubts about the Fix Style/LineEndConcatenation cop, is what we want? |
@@ -302,9 +302,9 @@ class NoMatchingReleaseTarget < APIException | |||
def verify_can_modify_target_package! | |||
return if User.current.can_modify_package?(@package) | |||
|
|||
raise CmdExecutionNoPermission, "no permission to execute command '#{params[:cmd]}' " + | |||
raise CmdExecutionNoPermission, "no permission to execute command '#{params[:cmd]}' " \ |
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 can live with this change, but I don't really understand it... I need to look up the reasoning for why a backslash is preferred here.
fd651eb
to
f3df58f
Compare
Codecov Report
@@ Coverage Diff @@
## master #4264 +/- ##
==========================================
+ Coverage 87.8% 87.98% +0.17%
==========================================
Files 340 340
Lines 18588 18463 -125
==========================================
- Hits 16321 16244 -77
+ Misses 2267 2219 -48
|
@mdeniz, thanks 😸 |
f3df58f
to
b767182
Compare
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.
@DavidKang in e85fd02 it should be frontend] Fix Style/HashSyntax offenses (in plural).
I think it is a good practise to mention in the commit message that the offenses were autocorrected.
Apart from that LGTM.
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.
LGTM except of a few missing parentheses and string interpolation which is probably caused by the rubocop autocorrection...
if dp.error | ||
currentpack['problems'] << 'error-' + dp.error | ||
end | ||
currentpack['problems'] << 'error-' + dp.error if dp.error |
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.
[nitpick]
Guess it is autocorrected but what about string interpolation?
"error-#{dp.error}"
if @submits.has_key? key | ||
currentpack['requests_to'].concat(@submits[key]) | ||
end | ||
currentpack['requests_to'].concat(@submits[key]) if @submits.has_key? key |
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.
[nitpick]
Guess it is autocorrected but what about parentheses?
@submits.has_key?(key)
(rubocop/rubocop#3224 has_key?
seems to be "deprecated")
if splitted.length > 2 | ||
prjname += ':' + splitted[-1] | ||
end | ||
prjname += ':' + splitted[-1] if splitted.length > 2 |
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.
[nitpick]
String interpolation?
src/api/app/models/bs_request.rb
Outdated
if actions.is_a? Hash | ||
actions = [actions] | ||
end | ||
actions = [actions] if actions.is_a? Hash |
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.
[nitpick]
Parentheses?
b767182
to
dcadfbd
Compare
@Ana06, I corrected the commit message. about the mention in the commit message that was autocorrected, I prefer to mention it when they are manually corrected.
@openSUSE/open-build-service Please review
The affected cops are:
Pair-programmed with: @bgeuken