Showing 255 of 255 total issues
Method help
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def help
res = _(
"<p><b><big>Address Setup</big></b></p>\n" \
"<p>Select <b>No Address Setup</b> if you do not want " \
"to assign an IP address to this device.\n" \
Method contents
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def contents
ifplugd_widget = IfplugdPriority.new(@settings)
MarginBox(
1,
0,
Method MainDialog
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def MainDialog(init_tab)
caption = _("Network Settings")
widget_descr = {
"tab" => CWMTab.CreateWidget(
"tab_order" => if Systemd.Running
- 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 write_ip_forwarding
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def write_ip_forwarding(routing, issues_list)
sysctl_config = CFA::SysctlConfig.new
sysctl_config.load
sysctl_config.forward_ipv4 = routing.forward_ipv4
sysctl_config.forward_ipv6 = routing.forward_ipv6
- 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 bondable?
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def bondable?(iface)
Yast.import "Arch"
Yast.include self, "network/lan/s390.rb"
# check if the device is L2 capable on s390
- 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_s390_devices
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def activate_s390_devices(section = nil)
profile_devices = section || ay_networking_section["s390-devices"] || {}
devices_section = Y2Network::AutoinstProfile::S390DevicesSection
.new_from_hashes(profile_devices)
connections = Y2Network::Autoinst::S390DevicesReader.new(devices_section).config
- 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 items
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def items
@routing_table.routes.map.each_with_index do |route, index|
[
index,
route.to.yield_self do |to|
- 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_sysconfig_dhcp
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def update_sysconfig_dhcp(hostname, old_hostname)
if old_hostname.nil? || old_hostname.dhcp_hostname == hostname.dhcp_hostname
log.info("No update for /etc/sysconfig/network/dhcp")
return
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 handle
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def handle(event)
return nil if event["EventReason"] != "Activated"
cur = Yast::UI.QueryWidget(Id(:wep_keys_table), :CurrentItem).to_i
case event["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 delete_hostname
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def delete_hostname(hostname)
entries = data.select(hostname_matcher(hostname))
entries.each do |pair|
entry = pair[:value]
if entry["canonical"] == hostname
Method contents
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def contents
textdomain "network"
HBox(
HSpacing(6),
Method handle
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def handle(event)
return nil if event["EventReason"] != "Activated"
cur = Yast::UI.QueryWidget(Id(:address_table), :CurrentItem).to_i
case event["ID"]
Method port_items_from
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def port_items_from(add_ifaces, included_ifaces, config)
raise ArgumentError, "list of devices for adding cannot be nil" if add_ifaces.nil?
raise ArgumentError, "some interfaces must be selected" if included_ifaces.nil?
if add_ifaces.empty? && !included_ifaces.empty?
Method aliases_to_ip_configs
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def aliases_to_ip_configs
last_id = 0
used_ids = aliases
.select { |a| a[:id] && a[:id] =~ /\A_\d+\z/ }
.map { |a| a[:id].sub("_", "").to_i }
- 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 EditHandler
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def EditHandler(options)
log.info("Edit handler, options: #{options.inspect}")
# validator: a reference to boolean( string) is expected
# setter: a reference to void( any) is expected
- 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 proposal_text
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def proposal_text
items = []
items << list_item_for(dhcp_summary) unless dhcp_ifaces.empty?
items << list_item_for(static_summary) unless static_ifaces.empty?
items << list_item_for(bridge_summary) unless bridge_connections.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 main
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def main
Yast.import "UI"
textdomain "network"
- 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 status_info
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def status_info(config)
textdomain "network"
case config.bootproto
when BootProtocol::STATIC
- 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 filter_out
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def filter_out(device_info, driver)
# filter out device with virtio_pci Driver and no Device File (bnc#585506)
if driver == "virtio_pci" && (device_info["dev_name"] || "") == ""
log.info("Filtering out virtio device without device file.")
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 write_eap_auth_settings
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def write_eap_auth_settings(conn)
file.wifi_security["key-mgmt"] = "wpa-eap"
section = file.section_for("802-1x")
section["eap"] = conn.eap_mode.downcase if conn.eap_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"