Showing 78 of 80 total issues
File migration_repos_workflow.rb
has 506 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "pp"
require "yast"
require "yast2/popup"
require "y2packager/medium_type"
Class BaseSystemRegistrationDialog
has 52 methods (exceeds 20 allowed). Consider refactoring. Open
class BaseSystemRegistrationDialog
include Yast::Logger
include Yast::I18n
include Yast::UIShortcuts
include Yast
File sw_mgmt.rb
has 450 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "tmpdir"
require "fileutils"
require "ostruct"
File base_system_registration_dialog.rb
has 435 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "yast/suse_connect"
require "ui/event_dispatcher"
require "uri"
Class MigrationReposWorkflow
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class MigrationReposWorkflow < WizardClient
include Yast::UIShortcuts
Yast.import "Sequencer"
Yast.import "Mode"
Class SwMgmt
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
class SwMgmt
include Yast
include Yast::Logger
extend Yast::I18n
Class Addon
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class Addon
extend Yast::I18n
include Yast::I18n
# The list of addons has not been loaded
Class SslCertificate
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class SslCertificate
include Yast::Logger
Yast.import "Stage"
Yast.import "Installation"
Class SCCAuto
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class SCCAuto < ::Installation::AutoClient
include Yast::Logger
extend Yast::I18n
# popup message
File registration_ui.rb
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "registration/connect_helpers"
require "registration/registration"
require "registration/sw_mgmt"
Method catch_registration_errors
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.catch_registration_errors(message_prefix: "",
show_update_hint: false,
silent_reg_code_mismatch: false,
&block)
# import the SSL certificate just once to avoid an infinite loop
File inst_scc.rb
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast/suse_connect"
require "cgi"
require "registration/addon"
Method evaluate_product
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def self.evaluate_product(p, selected, installed)
if Stage.initial && Mode.auto
Yast.import "AutoinstFunctions"
# note: AutoinstFunctions.selected_product should never be nil when
# AY let it pass here
- 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 handle_ssl_error
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def self.handle_ssl_error(error, certificate_imported)
cert = Storage::SSLErrors.instance.ssl_failed_cert
error_code = Storage::SSLErrors.instance.ssl_error_code
expected_cert_type = Storage::Config.instance.reg_server_cert_fingerprint_type
- 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 richtext_checkbox
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def richtext_checkbox(id:, label:, status:)
enabled = [:selected, :auto_selected, :available].include?(status)
if Yast::UI.TextMode
check = case status
when :selected, :registered
- 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 RegistrationUI
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class RegistrationUI
include Yast::Logger
include Yast::UIShortcuts
include Yast::I18n
extend Yast::I18n
Class MigrationSelectionDialog
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class MigrationSelectionDialog
include Yast::Logger
include Yast::I18n
include Yast::UIShortcuts
Class Registration
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class Registration
include Yast::Logger
attr_accessor :url
Method catch_registration_errors
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def self.catch_registration_errors(message_prefix: "",
show_update_hint: false,
silent_reg_code_mismatch: false,
&block)
# import the SSL certificate just once to avoid an infinite loop
- 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 InstSccClient
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class InstSccClient < Client
include Yast::Logger
extend Yast::I18n
# popup message