-
Notifications
You must be signed in to change notification settings - Fork 73
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 multiple rubocop violations #291
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #291 +/- ##
=========================================
+ Coverage 0.50% 0.68% +0.17%
=========================================
Files 15 15
Lines 2568 1905 -663
=========================================
Hits 13 13
+ Misses 2555 1892 -663
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
if nodeid[ostype] == 1 and ostype != nil | ||
raise "Error: no nodes generated for #{ostype}" | ||
end | ||
raise "Error: no nodes generated for #{ostype}" if nodeid[ostype] == 1 and !ostype.nil? |
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.
Can we disable the guard clause cop? I don't like it because of the long lines it generates. The old flow is much easier to understand IMHO.
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.
done
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.
You've disable the cop, but haven't undone the suggestion it made.
current_object.push(blob[0..-2]) | ||
object_depth.pop | ||
current_depth = current_depth.pred | ||
next |
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.
This next now looks redundant.
@@ -21,7 +20,7 @@ def open_file(path) | |||
dirname = File.join(path[1, path.length - 2]) # wtf |
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.
wtf indeed ...
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
its first positional argument and use that to generate a Beaker host | ||
configuration file. | ||
eos | ||
s.license = 'Apache2' |
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.
Unrelated, but is this SPDX?
@@ -204,7 +202,7 @@ def supported_values_help_text | |||
result << "\n\n" | |||
|
|||
result << "built-in beaker-hostgenerator hypervisors:\n" | |||
BeakerHostGenerator::Hypervisor.builtin_hypervisors().keys.each do |k| | |||
BeakerHostGenerator::Hypervisor.builtin_hypervisors.keys.each do |k| |
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 surprising this doesn't trigger the performance cop
BeakerHostGenerator::Hypervisor.builtin_hypervisors.keys.each do |k| | |
BeakerHostGenerator::Hypervisor.builtin_hypervisors.each_key do |k| |
if nodeid[ostype] == 1 and ostype != nil | ||
raise "Error: no nodes generated for #{ostype}" | ||
end | ||
raise "Error: no nodes generated for #{ostype}" if nodeid[ostype] == 1 and !ostype.nil? |
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.
You've disable the cop, but haven't undone the suggestion it made.
No description provided.