Showing 806 of 967 total issues
Method release_notes_package
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def release_notes_package
return @release_notes_package if @release_notes_package
log.info "Searching release notes for product #{product.name}..."
provides = Yast::Pkg.PkgQueryProvides("release-notes()")
- 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 load_product_data
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_product_data(key)
@product ||= {}
current_value = get_property(key)
# Already loaded
- 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 CheckAndInstallPackagesInteractive
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def CheckAndInstallPackagesInteractive(packages)
success = CheckAndInstallPackages(packages)
return true if success
if !LastOperationCanceled()
- 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 UseUnsignedItem
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def UseUnsignedItem(item_type, item_name, dont_show_dialog_ident, repository)
Builtins.y2milestone(
"UseUnsignedItem: type: %1, name: %2, dontshowid: %3, repo: %4",
item_type,
item_name,
- 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 SourceProbeError
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def SourceProbeError(url, error, description)
Builtins.y2milestone(
"Source probe: error: url: %1, error: %2, description: %3",
URL.HidePassword(url),
error,
- 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 ScriptStart
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def ScriptStart(patch_name, patch_version, patch_arch, script_path)
patch_full_name = FormatPatchName(patch_name, patch_version, patch_arch)
Builtins.y2milestone(
"ScriptStart callback: patch: %1, script: %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 ItemSignedWithUnknownSignature
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def ItemSignedWithUnknownSignature(item_type, item_name, key_id, dont_show_dialog_ident, repoid)
repo_url = Ops.get_string(Pkg.SourceGeneralData(repoid), "url", "")
description_text = Builtins.sformat(
if item_type == :package
# popup question, %1 stands for the package name, %2 for the complex multiline description of the GnuPG key
- 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 process_message
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def process_message(msg, max_len)
words = msg.split
log.info "words: %{words}"
- 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 release_notes_file
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def release_notes_file(directory, prefs)
langs = [prefs.user_lang]
langs << prefs.user_lang.split("_", 2).first if prefs.user_lang.include?("_")
langs << prefs.fallback_lang
- 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 show
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def show(contents, caption: nil, back_button: nil, next_button: nil, abort_button: nil, skip_store_for: [],
disable_buttons: [], next_handler: nil, back_handler: nil, abort_handler: nil)
widgets = widgets_in_contents(contents)
options = {
"contents" => widgets_contents(contents),
- 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 WaitForSymbolUserInput
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def WaitForSymbolUserInput(list_of_accepted, default_symb)
list_of_accepted = deep_copy(list_of_accepted)
user_input = nil
ret = nil
- 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 handleWidgets
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handleWidgets(widgets, event_descr)
event_descr = deep_copy(event_descr)
ret = nil
Builtins.foreach(widgets) do |w|
if ret.nil?
- 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 SourceReportError
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def SourceReportError(source_id, url, error, description)
Builtins.y2milestone(
"Source report: error: id: %1, url: %2, error: %3, description: %4",
source_id,
URL.HidePassword(url),
- 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 download_release_notes_index
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def download_release_notes_index(url_base)
url_index = url_base + "/directory.yast"
log.info("Index with available files: #{url_index}")
tmpfile = Tempfile.new("directory.yast-")
- 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 StartStopHandle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def StartStopHandle(widget, _key, event)
widget = deep_copy(widget)
event = deep_copy(event)
event_id = Ops.get(event, "ID")
case event_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 SourceCreateError
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def SourceCreateError(url, error, description)
Builtins.y2milestone(
"Source create: error: url: %1, error: %2, description: %3",
URL.HidePassword(url),
error,
- 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 ProgressEnd
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def ProgressEnd(id)
Builtins.y2milestone("ProgressFinish: %1", id)
# remove the last element from the progress stack
@progress_stack = Builtins.remove(
- 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 ValidateBasicType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def ValidateBasicType(value, type)
return Ops.is_term?(value) if type == "term"
return Ops.is_string?(value) if type == "string"
return Ops.is_symbol?(value) if type == "symbol"
return Ops.is_list?(value) if type == "list"
- 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 widgets_in_contents
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def widgets_in_contents(contents)
contents.each_with_object([]) do |arg, res|
case arg
when ::CWM::AbstractWidget
res << arg
- 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 ShowErrorPopUp
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def ShowErrorPopUp(heading, error_text, details)
bugzilla_url = "http://bugzilla.suse.com/"
bugzilla_url = "http://bugzilla.opensuse.org" if OSRelease.ReleaseName.include? "openSUSE"
success = UI.OpenDialog(
Opt(:decorated, :warncolor),
- 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"