Showing 173 of 173 total issues
Method main
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def main
textdomain "installation"
Yast.import "Installation"
Yast.import "String"
- 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 SetSecondStageInstallation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def SetSecondStageInstallation
if !Mode.autoupgrade
# Detect mode early to be able to setup steps correctly
if FileUtils.Exists(
Ops.add(Installation.destdir, Installation.file_update_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
Method adjust_modprobe_blacklist
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def adjust_modprobe_blacklist
# check whether we need to run it
brokenmodules = Linuxrc.InstallInf("BrokenModules")
if !brokenmodules || brokenmodules.empty?
log.info "No BrokenModules in install.inf, skipping..."
- 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 vnc_fw_proposal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def vnc_fw_proposal
# It only makes sense to show the blocked ports if firewall is
# enabled (bnc#886554)
return nil unless @settings.enable_firewall
# Show VNC port only if installing over VNC
- 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 get_url_from
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_url_from(url)
return nil unless url.is_a?(::String)
real_url = url.gsub(/\$arch\b/, Yast::Pkg.GetArchitecture)
real_url = real_url.gsub(/\$os_release_name\b/,
- 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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def run
if roles(refresh: true).empty?
log.info "No roles defined, skipping their dialog"
return :auto # skip forward or backward
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 import
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def import(data)
if !data["import"]
log.info "Do not import ssh keys/configuration"
ssh_importer.device = nil # do not copy ssh keys into the installed system
return true
- 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 preselect_product_if_needed
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def preselect_product_if_needed
return if Mode.update || products.size != 1
# As selecting a product can have side effects (especially in the full
# medium), do not select it twice.
- 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 format_sub_proposal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def format_sub_proposal(prop)
html = ""
warning = prop["warning"] || ""
if !warning.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 DeployImages
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def DeployImages(images, target, progress)
images = deep_copy(images)
progress = deep_copy(progress)
# unregister callbacks
PackageCallbacks.RegisterEmptyProgressCallbacks
- 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 EnableRequiredModules
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def EnableRequiredModules
# Lazy init
if @modules_to_enable_with_AC_on.nil?
feature = ProductFeatures.GetFeature(
"globals",
- 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 update_urls_from_connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update_urls_from_connect
begin
url = registration_url
rescue URI::InvalidURIError
raise RegistrationURLError
- 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 main
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def main
textdomain "installation"
Yast.import "ModulesConf"
- 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"