Showing 806 of 967 total issues
Method progress_start
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def progress_start(_id, _task, _in_percent, _is_alive, _min, _max, _val_raw, _val_percent)
Method GetDevTypeDescription
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def GetDevTypeDescription(type, longdescr)
if Builtins.issubstring(type, "#")
# Device type label
# This is what used to be Virtual Interface (eth0:1).
# In our data model, additional addresses for an interface
- 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 create
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def create(snapshot_type, description, previous: nil, cleanup: nil, important: false)
raise SnapperNotConfigured unless configured?
cmd = format(CREATE_SNAPSHOT_CMD,
root: target_root.shellescape,
- 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 all
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def all
raise SnapperNotConfigured unless configured?
out = Yast::SCR.Execute(
Yast::Path.new(".target.bash_output"),
- 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 List
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def List(devregex)
ret = []
if devregex == "" || devregex.nil?
Builtins.maplist(@Devices) do |_t, d|
Builtins.maplist(
- 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 Display
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def Display(parameters)
parameters = deep_copy(parameters)
@param = deep_copy(parameters)
# menubutton
- 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 GetEthTypeFromSysfs
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def GetEthTypeFromSysfs(dev)
sys_dir_path = "/sys/class/net/#{dev}"
if FileUtils.Exists("#{sys_dir_path}/wireless") ||
FileUtils.Exists("#{sys_dir_path}/phy80211")
- 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 SubprogressType
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def SubprogressType(type, max_value)
return if !@visible || Mode.commandline
Builtins.y2debug(
"SubprogressType: type: %1, max_value: %2",
- 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_new_filenames
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def write_new_filenames
result = []
to_write = (available_filenames + [selected_filename]).uniq
- 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 GetLoggingSettings
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def GetLoggingSettings(rule)
ret_val = nil
case rule
when "ACCEPT"
- 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 RemoveServiceSupportFromZone
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def RemoveServiceSupportFromZone(service, zone)
Yast.import "SuSEFirewallServices" # lazy import due to circular dependencies
needed = SuSEFirewallServices.GetNeededPortsAndProtocols(service)
# unknown service
- 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 find
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def find(product_name, content: nil)
log.info "Searching for a license for product #{product_name}"
return cache[product_name] if cache[product_name]
fetcher = LicensesFetchers.for(product_name) unless content
- 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 UpdateServiceStatusWidget
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def UpdateServiceStatusWidget(widget)
widget = deep_copy(widget)
return if !UI.WidgetExists(Id("_cwm_service_status_rp"))
if Mode.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 StartPackage
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def StartPackage(name, _location, _summary, installsize, is_delete)
return if !@enable_asterix_package
@_package_name = name
@_package_size = installsize
- 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 method_missing
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def method_missing(method, *args)
if instance_variable_defined?("@#{method}")
raise ArgumentError, "Method #{method} does not accept arguments" unless args.empty?
return instance_variable_get("@#{method}")
- 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 AdjustButtons
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def AdjustButtons(next_, back, abort, _help)
next_ = "" if next_.nil?
back = "" if back.nil?
abort = "" if abort.nil?
if next_ == ""
- 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 PrepareWorkflows
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def PrepareWorkflows(workflows)
workflows = deep_copy(workflows)
new_workflows = []
# Going through all workflows
- 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 TableRedraw
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def TableRedraw(descr, update_buttons)
descr = deep_copy(descr)
id_list = getIdList(descr)
@previous_selected_item = Ops.get(id_list, 0) if @previous_selected_item.nil?
entries = Builtins.maplist(id_list) do |opt_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 PrepareProposals
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def PrepareProposals(proposals)
proposals = deep_copy(proposals)
new_proposals = []
# Going through all proposals
- 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 GetCachedWorkflowFilename
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def GetCachedWorkflowFilename(type, src_id, name = "")
if ![:package, :addon].include?(type)
Builtins.y2error("Unknown workflow type: %1", type)
return nil
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"