Showing 806 of 967 total issues
File PackageCallbacks.rb
has 2396 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "uri"
require "packages/dummy_callbacks"
require "packages/file_conflict_callbacks"
File susefirewall2.rb
has 1754 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "network/susefirewall"
module Yast
# ----------------------------------------------------------------------------
File CommandLine.rb
has 1148 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class CommandLineClass < Module
include Yast::Logger
File ProductControl.rb
has 1138 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "yast2/control_log_dir_rotator"
require "yast2/popup"
module Yast
File Popup.rb
has 1135 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "erb"
# when we need to modify some old method, then sometimes it is easier to replace it with new one
require "yast2/popup"
File Wizard.rb
has 1103 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class WizardClass < Module
DEFAULT_ICON_NAME = "yast".freeze
File WorkflowManager.rb
has 1043 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "yast2/control_log_dir_rotator"
require "packages/package_downloader"
require "packages/package_extractor"
File NetworkInterfaces.rb
has 996 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "shellwords"
module Yast
# Reads and writes the ifcfg files (/etc/sysconfig/network/ifcfg-*).
Class PackageCallbacksClass
has 120 methods (exceeds 20 allowed). Consider refactoring. Open
class PackageCallbacksClass < Module
include Yast::Logger
# text to clean progress bar in command line
CLEAR_PROGRESS_TEXT = ("\b" * 10) + (" " * 10) + ("\b" * 10)
Method MediaChange
has a Cognitive Complexity of 101 (exceeds 5 allowed). Consider refactoring. Open
def MediaChange(error_code, error, url, product, current, current_label, wanted, wanted_label, double_sided, devices, current_device)
devices = deep_copy(devices)
if @autorefreshing && @autorefreshing_aborted
Builtins.y2milestone("Refresh aborted")
return "C"
- 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 Parse
has a Cognitive Complexity of 101 (exceeds 5 allowed). Consider refactoring. Open
def Parse(arguments)
args = deep_copy(arguments)
return {} if Ops.less_than(Builtins.size(args), 1)
# Parse 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 SignatureCheckDialogs.rb
has 838 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class SignatureCheckDialogsClass < Module
def main
Method RunFrom
has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring. Open
def RunFrom(from, allow_back)
former_result = :next
final_result = nil
@current_step = from # current module
- 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 susefirewalld.rb
has 795 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "y2firewall/firewalld/api"
require "network/susefirewall"
module Yast
File TablePopup.rb
has 787 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
module Yast
class TablePopupClass < Module
def main
File CWM.rb
has 784 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "cwm/abstract_widget"
module Yast
Method ParseOptions
has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring. Open
def ParseOptions(options, parameters)
parameters ||= {}
ret = []
# parsing options
- 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 WizardClass
has 92 methods (exceeds 20 allowed). Consider refactoring. Open
class WizardClass < Module
DEFAULT_ICON_NAME = "yast".freeze
def main
Yast.import "UI"
File CWMFirewallInterfaces.rb
has 704 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "yast"
require "y2firewall/firewalld"
require "y2firewall/helpers/interfaces"
module Yast
Class SuSEFirewall2Class
has 85 methods (exceeds 20 allowed). Consider refactoring. Open
class SuSEFirewall2Class < SuSEFirewallClass
CONFIG_FILE = "/etc/sysconfig/SuSEfirewall2".freeze
include Yast::Logger