Showing 173 of 173 total issues
Method main
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def main
Yast.import "UI"
textdomain "installation"
- 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 FindImageSet
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def FindImageSet(patterns)
patterns = deep_copy(patterns)
InitRepo()
# reset all data
- 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 InstUpdateInstaller
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
class InstUpdateInstaller
include Yast::Logger
include Yast::I18n
UPDATED_FLAG_FILENAME = "installer_updated".freeze
File inst_deploy_image.rb
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Yast
class InstDeployImageClient < Client
include Yast::Logger
def main
File inst_update_installer.rb
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "installation/instsys_packages"
require "installation/update_repositories_finder"
require "installation/updates_manager"
require "installation/selfupdate_verifier"
require "y2packager/self_update_addon_repo"
Method make_proposal
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def make_proposal(force_reset, language_changed)
tab_to_switch = 999
current_tab_affected = false
@have_blocker = false
- 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 RestoreAllChanges
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def RestoreAllChanges
nr_steps = Ops.multiply(4, Builtins.size(@all_supported_types))
id = "restoring_user_prefs"
AdjustProgressLayout(id, nr_steps, _("Restoring user preferences..."))
- 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 ProposalRunner
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class ProposalRunner
include Yast::I18n
include Yast::UIShortcuts
include Yast::Logger
include ::UI::TextHelpers
Method FileSystemCopy
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def FileSystemCopy(from, to, progress_start, progress_finish)
total_mb = if from == "/"
# root is a merge of two filesystems, df returns only one part for /
calculate_fs_size("/read-write") + calculate_fs_size("/read-only")
else
- 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 main
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def main
Yast.import "UI"
textdomain "installation"
- 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_dialog
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def handle_dialog
log.info("Offering repositories: #{repo_manager.repositories.map(&:repo_alias).inspect}")
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
Class SecuritySettings
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class SecuritySettings
include Yast::Logger
include Yast::I18n
# [Boolean] Whether the firewalld service will be enable
Method run
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def run
if Yast::Mode.auto
# Checking if second stage is needed and the environment has been setup.
second_stage_error = Yast::AutoinstFunctions.check_second_stage_environment
- 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 main
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def main
textdomain "installation"
Yast.import "Mode"
Yast.import "ImageInstallation"
- 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 UpdateRepository
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class UpdateRepository
include Yast::Logger
include Yast::I18n
# Where the repository information comes from
Method submod_descriptions_and_build_menu
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def submod_descriptions_and_build_menu
return true unless Yast::UI.TextMode # have menu only in text mode
# now build the menu button
menu_list = @submodules_presentation.each_with_object([]) do |submod, menu|
- 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 main
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def main
textdomain "installation"
Yast.import "Mode"
Yast.import "HwStatus"
- 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 RerunInstallationIfAborted
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def RerunInstallationIfAborted
# Second stage installation bas been aborted or has failed
if FileUtils.Exists(Installation.file_inst_aborted) ||
FileUtils.Exists(Installation.file_inst_failed)
# popup question (#x1)
- 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 main
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def main
Yast.import "UI"
# **
# <h3>Initialization of the disks</h3>
- 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 each_mounted_device
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def each_mounted_device(&block)
mnt_tmpdir = "#{Directory.tmpdir}/tmp_mnt_for_check"
mnt_tmpdir = SystemFilesCopy.CreateDirectoryIfMissing(mnt_tmpdir)
# CreateDirectory failed
- 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"