Showing 806 of 967 total issues
Method DoneProvide
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
def DoneProvide(error, reason, name)
Builtins.y2milestone("DoneProvide: %1, %2, %3", error, reason, name)
if @_provide_popup
UI.CloseDialog
- 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 WorkflowManagerClass
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
class WorkflowManagerClass < Module
include Yast::Logger
def main
Yast.import "UI"
Method InstallationSummary
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
def InstallationSummary(summary)
ret = ""
if Builtins.haskey(summary, "success")
ret = HTML.Para(
File Report.rb
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "yast2/popup"
module Yast
# Report module is universal reporting module. It properly display messages
File String.rb
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class StringClass < Module
include Yast::Logger
Method Handle
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Handle(widget, _key, event)
widget = deep_copy(widget)
event = deep_copy(event)
ret = Ops.get(event, "ID")
existing_filename = Convert.to_string(
Method CreateWidget
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
def CreateWidget(settings)
settings = deep_copy(settings)
# tsig keys management dialog help 1/4
help = _(
"<p><big><b>TSIG Key Management</b></big><br>\nUse this dialog to manage the TSIG keys.</p>\n"
Method ProbeKernel
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
def ProbeKernel
kernel_desktop_exists = ((Mode.normal || Mode.repair) &&
Pkg.PkgInstalled("kernel-desktop")) ||
Pkg.PkgAvailable("kernel-desktop")
Builtins.y2milestone(
- 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 Init
has a Cognitive Complexity of 45 (exceeds 5 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
- 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 Kernel.rb
has 451 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class KernelClass < Module
include Yast::Logger
Method ProposalSummary
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ProposalSummary
# output: $[ "output" : "HTML Proposal", "warning" : "HTML Warning" ];
output = ""
warning = ""
Method Parse
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Parse(arguments)
args = deep_copy(arguments)
return {} if Ops.less_than(Builtins.size(args), 1)
# Parse command
Class ProductControlClass
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
class ProductControlClass < Module
include Yast::Logger
# Product control system roles key
# @return [String] System roles
Class LabelClass
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
class LabelClass < Module
def main
textdomain "base"
end
Class SystemService
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
class SystemService
extend Forwardable
# Error when a service is not found
class NotFoundError < RuntimeError; end
Class ArchClass
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
class ArchClass < Module
def main
# local variables
@_architecture = nil
Method Run
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def Run(widgets, functions, skip_store_for: [])
widgets = deep_copy(widgets)
functions = deep_copy(functions)
widgets = mergeFunctions(widgets, functions)
PushSettings()
- 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 SlideShow.rb
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "yast2/system_time"
module Yast
class SlideShowClass < Module
Method WS_check
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def WS_check(aliases, sequence)
aliases = deep_copy(aliases)
sequence = deep_copy(sequence)
ret = []
- 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 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
def main
textdomain "base"
Yast.import "FileUtils"