Showing 806 of 967 total issues
Method TableHandle
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
def TableHandle(descr, key, event_descr)
descr = deep_copy(descr)
event_descr = deep_copy(event_descr)
event_id = Ops.get(event_descr, "ID")
UI.SetFocus(Id(:_tp_table))
Method Init
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Init(cmdlineinfo, args)
cmdlineinfo = deep_copy(cmdlineinfo)
args = deep_copy(args)
# remember the command line specification
# required later by xmlhelp command
Class StringClass
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
class StringClass < Module
include Yast::Logger
# @note it is ascii chars only
UPPER_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".freeze
Method Write
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Write(devregex)
log.info("Writing configuration")
log.debug("Devices=#{@Devices}")
log.debug("Deleted=#{@Deleted}")
Method Write
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def Write(devregex)
log.info("Writing configuration")
log.debug("Devices=#{@Devices}")
log.debug("Deleted=#{@Deleted}")
- 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 38 (exceeds 5 allowed). Consider refactoring. Open
def Run(commandline)
commandline = deep_copy(commandline)
# The main ()
Builtins.y2milestone("----------------------------------------")
Builtins.y2milestone("Command line interface started")
- 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
Class CWMFirewallInterfacesClass
has 42 methods (exceeds 20 allowed). Consider refactoring. Open
class CWMFirewallInterfacesClass < Module
include Y2Firewall::Helpers::Interfaces
include Yast::Logger
# [Array<String>] List of all interfaces relevant for firewall settings
Method Load
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def Load(modulename, moduleargs, vendorname, devicename, ask_before_loading, with_modprobe)
if modulename != "" &&
# there is no reason for checking initrd, if I need the module to get loaded, I just need to
# check if it isn't already loaded
# && (!contains (Initrd::ListModules (), modulename))
- 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 prepareWidget
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
def prepareWidget(widget_descr)
widget_descr = deep_copy(widget_descr)
w = deep_copy(widget_descr)
widget = Ops.get_symbol(w, "widget", :inputfield)
Method main
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def main
Yast.import "UI"
textdomain "base"
- 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
File PortRanges.rb
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
# Tools for ranges of network ports, as used by iptables for firewalling.
#
Class DummyCallbacks
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
class DummyCallbacks
class << self
include Yast::Logger
def register
Method ReadServicesDefinedByRPMPackages
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def ReadServicesDefinedByRPMPackages
log.info "Reading SuSEfirewall2 services from #{SERVICES_DIR}"
@services ||= {}
if !FileUtils.Exists(SERVICES_DIR) ||
- 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 ProcessSystemCommands
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ProcessSystemCommands(command)
command = deep_copy(command)
# handle help for specific command
# this needs to be before general help, so "help help" works
if Ops.get(command, ["options", "help"])
Class FirewalldBashAPI
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class FirewalldBashAPI
include Yast::Logger
private
Class CWMClass
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class CWMClass < Module
def main
Yast.import "UI"
textdomain "base"
Method ConvertToServicesDefinedByPackages
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def ConvertToServicesDefinedByPackages
return if @already_converted
if FileUtils.Exists(@converted_to_services_dbp_file)
@already_converted = 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 main
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
def main
textdomain "base"
Yast.import "Mode"
Yast.import "Service"
Method CreateTableDescr
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
def CreateTableDescr(attrib, widget_descr)
attrib = deep_copy(attrib)
widget_descr = deep_copy(widget_descr)
ValidateTableAttr(attrib)
File URL.rb
has 375 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
# A module for dealing with URLs
#