Showing 806 of 967 total issues
Method ParseOptions
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ParseOptions(options, parameters)
parameters ||= {}
ret = []
# parsing options
Method Command
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def Command
# if we are done already, return the result
return { "command" => @aborted ? "abort" : "exit" } if @done
# there is a command in the cache
- 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 board_compatible
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def board_compatible
if @_board_compatible.nil?
@_checkgeneration = ""
systemProbe = Convert.convert(
SCR.Read(path(".probe.system")),
- 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 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
def main
Yast.import "UI"
Yast.import "Label"
Yast.import "Popup"
File CWMTable.rb
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class CWMTableClass < Module
def main
Method ShowInstallationSummaryMap
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ShowInstallationSummaryMap(summary)
summary_str = InstallationSummary(summary)
if summary["installed"] == 0 && summary["updated"] == 0 && summary["removed"] == 0 && summary["remaining"] == []
Builtins.y2warning("No summary, skipping summary dialog")
Class KernelClass
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
class KernelClass < Module
include Yast::Logger
# default configuration file for Kernel modules loaded on boot
MODULES_CONF_FILE = "yast.conf".freeze
Method ProbeKernel
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ProbeKernel
kernel_desktop_exists = ((Mode.normal || Mode.repair) &&
Pkg.PkgInstalled("kernel-desktop")) ||
Pkg.PkgAvailable("kernel-desktop")
Builtins.y2milestone(
Method CreateTableDescr
has 90 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)
add_button = if Ops.get_boolean(attrib, "add_delete_buttons", true)
Method Run
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Run(commandline)
commandline = deep_copy(commandline)
# The main ()
Builtins.y2milestone("----------------------------------------")
Builtins.y2milestone("Command line interface started")
Method GetDevTypeDescription
has 88 lines of code (exceeds 25 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
Method CreateStartStopWidget
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
def CreateStartStopWidget(settings)
settings = deep_copy(settings)
start_now_button = Ops.get_locale(
settings,
Class PackageClass
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class PackageClass < Module
extend Forwardable
include Yast::Logger
def_delegators :backend, :Available, :PackageAvailable, :DoInstallAndRemove, :InstallKernel
Class CommandLineClass
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class CommandLineClass < Module
include Yast::Logger
def main
Yast.import "Directory"
Method main
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
def main
Yast.import "Directory"
Yast.import "Mode"
Yast.import "Popup"
Yast.import "Report"
Method WS_check
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
def WS_check(aliases, sequence)
aliases = deep_copy(aliases)
sequence = deep_copy(sequence)
ret = []
Method ExtractCmdlineParameters
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def ExtractCmdlineParameters(line)
return unless line
# list of parameters to be discarded (yast internals)
cmdlist = list_of_params(line)
- 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 ProcessTerm
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def ProcessTerm(term, widgets)
return term if term.empty?
ret = Yast::Term.new(term.value)
- 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 Rich2Plain
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def Rich2Plain(richtext)
Builtins.y2debug("richtext=%1", richtext)
lparts = Builtins.splitstring(DropWS(richtext), "<")
Builtins.y2debug("lparts=%1", lparts)
- 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 menu.rb
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "shellwords"
module Yast
class MenuClient < Client
def main