File inst_finish.rb
has 427 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "installation/minimal_installation"
require "shellwords"
Yast.import "UI"
Class InstFinishClient
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class InstFinishClient < Client
include Yast::Logger
def main
textdomain "installation"
Method keep_only_valid_steps
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def keep_only_valid_steps(stage)
steps = stage["steps"].map do |s|
# some steps are called in live installer only
next nil if s == "" || s.nil?
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method write
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def write
stages.each_with_index do |stage, index|
current_stage_percent = 100 * index / stages.size
SlideShow.StageProgress(
current_stage_percent,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method report_messages
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def report_messages
return if Misc.boot_msg.empty?
return if Mode.autoinst
# --------------------------------------------------------------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method report_hooks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def report_hooks
used_hooks = Hooks.all.select(&:used?)
failed_hooks = used_hooks.select(&:failed?)
if !failed_hooks.empty?
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method control_stages
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def control_stages
log.info "Using inst_finish steps definition from control file"
stages = deep_copy(ProductControl.inst_finish)
# Inst-finish need to be translated (#343783)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"