Showing 806 of 967 total issues
Method UniqueOption
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def UniqueOption(options, unique_options)
return nil if options.nil? || unique_options.nil?
# sanity check
if unique_options.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 ShowText
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def ShowText(headline_string, message_string)
Builtins.y2milestone(1, "%1", message_string) if @log_errors
if @display_errors
if Mode.commandline
- 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 LongError
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def LongError(error_string, width: 60, height: 10)
Builtins.y2error(1, "%1", error_string) if @log_errors
if @display_errors
if Mode.commandline
- 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 LongWarning
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def LongWarning(warning_string, width: 60, height: 10)
Builtins.y2warning(1, "%1", warning_string) if @log_warnings
if @display_warnings
if Mode.commandline
- 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 UnLoadExtension
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def UnLoadExtension(package, message)
Builtins.y2error("This module should be used in Stage::initial only!") if !Stage.initial
if package.nil? || package == ""
Builtins.y2error("Such package name can't work: %1", package)
- 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 DebugBrowseHelper
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def DebugBrowseHelper(variable, indent)
variable = deep_copy(variable)
simple = FormatSimpleType(variable, indent)
if !simple.nil?
Builtins.y2debug("%1", simple)
- 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 Warning
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def Warning(warning_string)
Builtins.y2warning(1, "%1", warning_string) if @log_warnings
if @display_warnings
if Mode.commandline
- 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 Message
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def Message(message_string)
Builtins.y2milestone(1, "%1", message_string) if @log_messages
if @display_messages
if Mode.commandline
- 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 ChangeLineField
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def ChangeLineField(file, line, field, entry)
Builtins.y2debug("line %1 field %2 entry %3", line, field, entry)
changed = false
if !Builtins.haskey(Ops.get_map(file.value, "l", {}), line)
Ops.set(file.value, ["l", 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 FormatSimpleType
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def FormatSimpleType(variable, indent)
variable = deep_copy(variable)
if Ops.is_void?(variable)
Builtins.sformat("%2%1 (void)", variable, indent)
elsif Ops.is_boolean?(variable)
- 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 LongMessage
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def LongMessage(message_string, width: 60, height: 10)
Builtins.y2milestone(1, "%1", message_string) if @log_messages
if @display_messages
if Mode.commandline
- 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 Error
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def Error(error_string)
Builtins.y2error(1, "%1", error_string) if @log_errors
if @display_errors
if Mode.commandline
- 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 LoadExtension
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def LoadExtension(package, message)
Builtins.y2error("This module should be used in Stage::initial only!") if !Stage.initial
if package.nil? || package == ""
Builtins.y2error("Such package name can't work: %1", package)
- 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 conflict?
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def conflict?(only: [], show_information: true)
return false if yast_config_file.empty?
conflicting_attrs = Sysctl::ATTRIBUTES.keys
conflicting_attrs &= only unless only.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 FromBits
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def FromBits(bits)
return "" unless bits.between?(0, 32)
b = Ops.divide(bits, 8)
d = Ops.modulo(bits, 8)
- 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 NewProgressIcons
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def NewProgressIcons(window_title, progress_title, length, stg, tits, help_textmap, _icons_definition)
Method initialize
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(number, snapshot_type, previous_number, timestamp, user, cleanup_algo, description)
Method ShowAndRunOrig
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def ShowAndRunOrig(widget_names, widget_descr, contents, caption, back_button, next_button, fallback)
Method popupLayoutInternalTypeWithLabel
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def popupLayoutInternalTypeWithLabel(headline, message, button_box, label, richtext, width, height)
Method AnyQuestionRichText
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def AnyQuestionRichText(headline, richtext, hdim, vdim, yes_button_message, no_button_message, focus)