Showing 78 of 80 total issues
Method install_products
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def install_products
not_installed = []
Addon.registered_not_installed.each do |addon|
# FIXME: fix the product installation, the add-on name might not match
- 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 register_addons
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def register_addons(selected_addons, known_reg_codes)
Yast::Wizard.SetContents(
# dialog title
_("Register Extensions and Modules"),
# display only the products which need a registration code
- 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_from_system
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.import_from_system
prefix = Yast::Installation.destdir
SslCertificate::PATHS.each do |file|
cert_file = File.join(prefix, file)
- 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 install_updates?
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def install_updates?
# ask only at installation/update
return true unless Yast::Mode.installation || Yast::Mode.update
options = Storage::InstallationOptions.instance
- 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 too many return
statements within this method. Open
return :skip
Avoid too many return
statements within this method. Open
return :cancel if init_registration == :cancel
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return nil if old_conf.ncc?
Avoid too many return
statements within this method. Open
return false unless ret
Avoid too many return
statements within this method. Open
return old_conf.stripped_url.to_s
Avoid too many return
statements within this method. Open
return :abort unless success
Method preselect_recommended
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def preselect_recommended
# something is already selected/registered, keep the user selection unchanged
return if !Addon.selected.empty? || !Addon.registered.empty?
@all_addons.each do |a|
- 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 activate_repositories
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def activate_repositories
all_repos = Yast::Pkg.SourceGetCurrent(false)
all_repos.each do |repo|
repo_data = Yast::Pkg.SourceGeneralData(repo)
- 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 handle_network_error
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.handle_network_error(message_prefix, e)
if Yast::NetworkService.isNetworkRunning
# FIXME: use a better message, this one has been reused after the text freeze
report_error(message_prefix + _("Invalid URL."), e.message)
elsif Helpers.network_configurable && !Yast::Mode.auto
- 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 hide_reg_codes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.hide_reg_codes(settings)
return settings unless settings.is_a?(Hash)
# create a duplicate
filtered = settings.dup
- 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 register_base
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def register_base
until Registration.is_registered?
# register the base system if not already registered
base_reg_dialog = ::Registration::UI::BaseSystemRegistrationDialog.new
ret = base_reg_dialog.run
- 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 select_addons
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def select_addons
log.group "Select add-ons" do |group|
# FIXME: available_addons is called just to fill cache with popup
return :cancel if get_available_addons == :cancel
- 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 url?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def url?
return false if value.to_s.empty?
uri = URI(value)
uri.scheme ? true : 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"