Showing 218 of 255 total issues
Avoid too many return
statements within this method. Open
return "escon"
Avoid too many return
statements within this method. Open
return false if !Popup.ContinueCancel(msg)
Avoid too many return
statements within this method. Open
return false if Abort()
Avoid too many return
statements within this method. Open
return "xp"
Avoid too many return
statements within this method. Open
return "qeth"
Avoid too many return
statements within this method. Open
return "ficon"
Avoid too many return
statements within this method. Open
return ""
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return false
Method Modified
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def Modified
return true if @modified
return true unless system_config == yast_config
return true if NetworkConfig.Modified
return true if NetworkService.Modified
- 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 config
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def config
configs = @section.interfaces.map do |interface_section|
log.info "Creating config for interface section: #{interface_section.inspect}"
config = create_config(interface_section)
config.propose # propose reasonable defaults for not set attributes
- 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 AddressDialog
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def AddressDialog(builder:)
ret = Y2Network::Dialogs::EditInterface.run(builder)
log.info "AddressDialog res: #{ret.inspect}"
- 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 ensure_network_running
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ensure_network_running
network = false
timeout = NM_DHCP_TIMEOUT
while timeout > 0
if NetworkService.isNetworkRunning
- 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 encode_hosts_line
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def encode_hosts_line(canonical, aliases)
encoded_aliases = aliases ? Punycode.EncodePunycodes(aliases) : []
encoded_canonical = canonical ? Punycode.EncodeDomainName(canonical) : ""
encoded = ""
- 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 AddHandler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def AddHandler(options)
# slaves option is marked as obsolete, bond_ports should be used instead.
# If both options are present, new one (bond_ports) wins.
if !options.key?("bond_ports") && options.key?("slaves")
options["bond_ports"] = options.delete("slaves")
- 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 HardwareName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def HardwareName(hardware, id)
return "" if id.nil? || id.empty?
return "" if hardware.nil? || hardware.empty?
# filter out a list of hwinfos which correspond to the given 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 needed_modules
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def needed_modules(netcards_hwinfo)
netcards_hwinfo.each_with_object([]) do |h, modules|
name = h.fetch("module", "")
next if name.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 interface_protocol
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def interface_protocol(connection)
return _("Not configured") if connection.nil?
bootproto = connection.bootproto.name
- 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"