Showing 806 of 967 total issues
Method HaveService
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def HaveService(service, protocol, interface)
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 ReadSysconfigSuSEFirewall
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def ReadSysconfigSuSEFirewall(variables)
variables = deep_copy(variables)
Builtins.foreach(variables) do |variable|
value = Convert.to_string(
SCR.Read(Builtins.add(path(".sysconfig.SuSEfirewall2"), variable))
- 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 PortIsInPortranges
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def PortIsInPortranges(port, port_ranges)
port_ranges = deep_copy(port_ranges)
return false if Builtins.size(port_ranges) == 0
ret = false
- 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 StringsOfTerm
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def StringsOfTerm(term)
term = deep_copy(term)
rets = []
args = Builtins.size(term)
index = 0
- 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 cd_devices
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def cd_devices(preferred)
cds = Convert.convert(
SCR.Read(path(".probe.cdrom")),
from: "any",
to: "list <map>"
- 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 curl_proxy_args
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def curl_proxy_args
# Import the module when it is needed to avoid building projects (bsc#1079045)
Yast.import "Proxy"
return @curl_proxy_args if @curl_proxy_args
- 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 ValidateValueContents
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def ValidateValueContents(key, value, widget)
error = ""
case key
when "label"
s = Convert.to_string(value)
- 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 find_control_package
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def find_control_package(release_package)
return nil unless release_package&.deps
release_package.deps.each do |dep|
provide = dep["provides"]
- 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 Launch
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def Launch(modul)
function = Ops.get_string(@Modules, [modul, "X-SuSE-YaST-Call"], "")
argument = Ops.get_string(@Modules, [modul, "X-SuSE-YaST-Argument"], "")
Builtins.y2debug("Calling: %1 (%2)", function, argument)
- 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 init_scalars_from_hash
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def init_scalars_from_hash(hash)
hash.each_pair do |key, value|
name = attrib_name(key)
if name.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 BrowseTreeHelper
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def BrowseTreeHelper(variable, indent)
variable = deep_copy(variable)
simple = FormatSimpleType(variable, indent)
return Item(simple) unless simple.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 load_product_features
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def load_product_features
if installation_layout && !installation_layout.empty?
@mode = installation_layout[:mode] unless installation_layout[:mode].nil?
@banner = installation_layout[:banner] unless installation_layout[:banner].nil?
elsif installation_ui == "sidebar"
- 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 ComputePackage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ComputePackage
packages = GetPackages()
the_kernel = Ops.get(packages, 0, "")
Builtins.y2milestone("Selecting '%1' as kernel package", the_kernel)
Method Stage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Stage(stage, title, step)
return if !@visible
Step(step) if -1 != step
Method NextStage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def NextStage
return if !@visible
NextStep()
Method main
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def main
Yast.import "UI"
Yast.import "LogViewCore"
@command = "/usr/bin/tail -n 25 -f '/var/log/messages'"
Method Check
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Check
# we already have a lock
return @have_lock if !@have_lock.nil?
# just to allow 'Retry', see more in bug #280383
Method DividePortsAndPortRanges
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def DividePortsAndPortRanges(unsorted_ports, with_aliases)
unsorted_ports = deep_copy(unsorted_ports)
ret = {}
Builtins.foreach(unsorted_ports) do |port|
Method ChooseItemSimple
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ChooseItemSimple(title, items, selected)
items = deep_copy(items)
item = nil
items = Builtins.maplist(items) { |i| Item(Id(i), i, i == selected) }
Method ActivateConfiguration
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ActivateConfiguration
# just disabled
return true if !SuSEFirewallIsInstalled()
# starting firewall during second stage can cause deadlock in systemd - bnc#798620