Showing 806 of 967 total issues
Avoid deeply nested control flow statements. Open
is_vnc_enabled = true if set_vnc_enabled_to == true
Method Read
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def Read
# Do not read it again and again
# to avoid rewriting changes already made
if @configuration_has_been_read
Builtins.y2milestone(
- 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 GetAdditionalServices
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def GetAdditionalServices(protocol, zone)
if !IsSupportedProtocol(protocol)
Builtins.y2error("Unknown protocol '%1'", protocol)
return nil
end
- 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 UpdateGlobalProgress
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def UpdateGlobalProgress(value, label)
value ||= @total_progress_value
label ||= @total_progress_label
if UI.WidgetExists(:progressTotal)
- 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 GenericHandleInput
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def GenericHandleInput
button = UI.PollInput
# in case of cancel ask user if he really wants to quit installation
if [:abort, :cancel].include?(button)
- 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 InstallKernel
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def InstallKernel(kernel_modules)
kernel_modules = deep_copy(kernel_modules)
# this function may be responsible for the horrible startup time
Builtins.y2milestone("want: %1", kernel_modules)
if kernel_modules == []
- 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 FormatPatchName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def FormatPatchName(patch_name, patch_version, patch_arch)
patch_full_name = (!patch_name.nil? && patch_name != "") ? patch_name : ""
if patch_full_name != ""
if !patch_version.nil? && patch_version != ""
- 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 ScriptProgress
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def ScriptProgress(ping, output)
Builtins.y2milestone("ScriptProgress: ping:%1, output: %2", ping, output)
if @_script_popup
if ping
- 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 PrintInternal
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def PrintInternal(string, newline)
return if !Mode.commandline
# avoid using of uninitialized value in .dev.tty perl agent
if string.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 checkDisabled
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def checkDisabled(mod)
mod = deep_copy(mod)
if mod.nil?
Builtins.y2error("Unknown module %1", mod)
return 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
Avoid deeply nested control flow statements. Open
@aborted = true if !@interactive
Avoid deeply nested control flow statements. Open
@aborted = true if !@interactive
Method RunRequired
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def RunRequired(stage, mode)
modules = getModules(stage, mode, :enabled)
if modules.nil?
Builtins.y2error("Undefined %1/%2", stage, mode)
- 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
Avoid deeply nested control flow statements. Open
@aborted = true if !@interactive
Method Handle
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def Handle(_key, event)
event = deep_copy(event)
@last_event = deep_copy(event)
current = Convert.to_string(UI.QueryWidget(Id(:_hw_items), :CurrentItem))
if Ops.get(event, "ID") == :_hw_items
- 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
Avoid deeply nested control flow statements. Open
if Builtins.contains(present, opt_key)
Report.Error(
# error report
_("The selected option is already present.")
)
Method find_ids
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def find_ids(term)
term.each_with_object([]) do |arg, res|
next unless arg.is_a? Yast::Term
if arg.value == :id
- 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 RemoveWorkflow
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def RemoveWorkflow(type, src_id, name)
Builtins.y2milestone(
"Removing Workflow: Type %1, ID %2, Name %3",
type,
src_id,
- 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
Avoid deeply nested control flow statements. Open
@aborted = true if !@interactive
Avoid deeply nested control flow statements. Open
return nil if opt_key.nil?