Showing 806 of 967 total issues
Method AnyQuestion3
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
def AnyQuestion3(headline, message, yes_button_message, no_button_message, retry_button_message, focus)
yes_button = Empty()
no_button = Empty()
retry_button = Empty()
Method CreateInterfacesWidget
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
def CreateInterfacesWidget(settings)
settings = deep_copy(settings)
widget = HBox(
HSpacing(1),
VBox(
Method Setup
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
def Setup(stages)
stages = deep_copy(stages)
log.info "SlideShow stages: #{stages}"
# initiliaze the generic counters
Reset()
Method ShowErrorPopUp
has 67 lines of code (exceeds 25 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),
Class SuSEFirewallProposalClass
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class SuSEFirewallProposalClass < Module
include Yast::Logger
def main
textdomain "base"
Class SignatureCheckDialogsClass
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class SignatureCheckDialogsClass < Module
def main
Yast.import "Pkg"
Yast.import "UI"
textdomain "base"
Class TablePopupClass
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class TablePopupClass < Module
def main
Yast.import "UI"
textdomain "base"
Method TableHandle
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
def TableHandle(descr, key, event_descr)
descr = deep_copy(descr)
event_descr = deep_copy(event_descr)
event_id = Ops.get(event_descr, "ID")
attrib = Ops.get_map(descr, "_cwm_attrib", {})
File WizardHW.rb
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class WizardHWClass < Module
def main
File GPGWidgets.rb
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class GPGWidgetsClass < Module
def main
Method ChooseItem
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ChooseItem(_title, items, selected)
items = deep_copy(items)
item = nil
items = Builtins.maplist(items) do |i|
Method ProposeFunctions
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ProposeFunctions
known_interfaces = SuSEFirewall.GetAllKnownInterfaces
dial_up_interfaces = []
non_dup_interfaces = []
Method has_many
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def has_many(*relations, scope: nil, cache: false) # rubocop:disable Naming/PredicateName
scope = "#{scope}_" if scope
enable_modifications_cache if cache
define_method "relations" do
Method main
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def main
# This file contains only translations for
# FATE #300687: Ports for SuSEfirewall added via packages
#
# Translations are grabbed when 'make pot' is called.
Method ItemSignedWithUnknownSignature
has 65 lines of code (exceeds 25 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
Method StoreAllowedInterfaces
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def StoreAllowedInterfaces(services)
services = deep_copy(services)
# do not save anything if configuration didn't change
return if !configuration_changed
- 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 AddModule
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def AddModule(modname, modargs)
log.warn "Initrd.AddModule() is deprecated, do not use (sysconfig.kernel.INITRD_MODULES " \
"is not written anymore, see bnc#895084)"
if Stage.initial && Builtins.size(@modules) == 0
- 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 New
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def New(window_title, progress_title, length, stg, tits, help_text)
stg = deep_copy(stg)
tits = deep_copy(tits)
return if !@visible
- 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 ShowInstallationSummaryMap
has a Cognitive Complexity of 19 (exceeds 5 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")
- 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 ProposeFunctions
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def ProposeFunctions
known_interfaces = SuSEFirewall.GetAllKnownInterfaces
dial_up_interfaces = []
non_dup_interfaces = []
- 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"