Showing 344 of 711 total issues
Class Win32EventLog
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class Win32EventLog
using ManageIQ::UnicodeString
# Standard file log names
SYSTEM_LOGS = %w(Application System Security)
- Create a ticketCreate a ticket
Method copy
has a Cognitive Complexity of 29 (exceeds 8 allowed). Consider refactoring. Open
def copy(from, to, recursive = false)
allTargets = []
from = [from] unless from.kind_of?(Array)
from.each { |t| allTargets.concat(dirGlob(t)) }
- Read upRead up
- Create a ticketCreate a ticket
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 copyOut
has a Cognitive Complexity of 29 (exceeds 8 allowed). Consider refactoring. Open
def copyOut(from, to, recursive = false)
allTargets = []
from = [from] unless from.kind_of?(Array)
from.each { |t| allTargets.concat(dirGlob(t)) }
- Read upRead up
- Create a ticketCreate a ticket
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 findEntry
has a Cognitive Complexity of 29 (exceeds 8 allowed). Consider refactoring. Open
def findEntry(name, flags = FE_EITHER)
de = nil # found directory entry.
skip_next = found = false
offset = 0
- Read upRead up
- Create a ticketCreate a ticket
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 initialize
has a Cognitive Complexity of 28 (exceeds 8 allowed). Consider refactoring. Open
def initialize(filename, ost = nil) # TODO: Always pass in MiqVm
ost ||= OpenStruct.new
@ost = ost
@dataDir = ost.config.try(:dataDir)
ost.scanData = {} if ost.scanData.nil?
- Read upRead up
- Create a ticketCreate a ticket
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 MSRegHive
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class MSRegHive
using ManageIQ::UnicodeString
attr_reader :fileLoadTime, :fileParseTime, :digitalProductKeys, :xmlNode
- Create a ticketCreate a ticket
Method d_init
has a Cognitive Complexity of 27 (exceeds 8 allowed). Consider refactoring. Open
def d_init
# Check to see if a descriptor was not embedded.
descriptor = dInfo.Descriptor
if descriptor.nil?
f = File.open(dInfo.fileName, "rb")
- Read upRead up
- Create a ticketCreate a ticket
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 dumpCacheRanges
has a Cognitive Complexity of 27 (exceeds 8 allowed). Consider refactoring. Open
def dumpCacheRanges
str = k_start = k_prev = nil
invalid = true
out = []
@clusters.keys.sort.each do |k|
- Read upRead up
- Create a ticketCreate a ticket
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 initialize
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(fs)
@fs = fs
@os_type = "Linux"
@distribution = nil
@description = nil
- Create a ticketCreate a ticket
Method doUpdate
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
def doUpdate(cs)
#
# The directory where the collection will be created.
#
destDir = cs.todir
- Create a ticketCreate a ticket
Method insert_XML
has a Cognitive Complexity of 25 (exceeds 8 allowed). Consider refactoring. Open
def insert_XML(key, value, xml)
maj, min, other = key.split(".")
# Any elements that cannot be split are put into a misc class
min, maj = maj, maj if min.nil?
- Read upRead up
- Create a ticketCreate a ticket
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 files
has a Cognitive Complexity of 25 (exceeds 8 allowed). Consider refactoring. Open
def files(miqvm = nil)
return @files if @files
log_header = "VmConfig.files"
@files = []
- Read upRead up
- Create a ticketCreate a ticket
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 readVBLK
has a Cognitive Complexity of 25 (exceeds 8 allowed). Consider refactoring. Open
def self.readVBLK(disk, ph)
vblk = LdmScanner.readStruct(disk, LdmScanner::VBLK)
return if vblk.data_length == 0
buf = vblk.padding
- Read upRead up
- Create a ticketCreate a ticket
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 prepare_filter!
has a Cognitive Complexity of 25 (exceeds 8 allowed). Consider refactoring. Open
def self.prepare_filter!(filter)
raise ArgumentError, "filter must be a Hash" unless filter.kind_of?(Hash)
filter[:rec_count] = 0 if filter[:rec_count].nil?
- Read upRead up
- Create a ticketCreate a ticket
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 initialize
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(_c, fs)
@networks = []
regHnd = RemoteRegistry.new(fs, true)
software_doc = regHnd.loadHive("software", [
- Create a ticketCreate a ticket
Class MiqMountManager
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class MiqMountManager < MiqFS
attr_accessor :rootVolume, :volumes, :guestOS, :fileSystems, :devHash, :osNames, :volMgr, :noFsVolumes, :payloads
def self.mountVolumes(volMgr, vmCfg, ost = nil)
rootTrees = []
- Create a ticketCreate a ticket
Method systemIdentifier
has a Cognitive Complexity of 24 (exceeds 8 allowed). Consider refactoring. Open
def self.systemIdentifier(fs = nil, options = {})
# If we are not passed a fs handle return the %systemRoot% from the environment
if fs.nil?
raise(MiqException::MiqVmMountError, "System root not available through environment variables.") if ENV["SystemRoot"].nil?
return File.expand_path(ENV["SystemRoot"].tr('\\', '/'))
- Read upRead up
- Create a ticketCreate a ticket
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 convert
has a Cognitive Complexity of 24 (exceeds 8 allowed). Consider refactoring. Open
def convert(filename)
@convertText = ""
# $log.debug "Processing Windows Configuration file [#{filename}]"
xml_data = nil
- Read upRead up
- Create a ticketCreate a ticket
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 fs_init
has a Cognitive Complexity of 24 (exceeds 8 allowed). Consider refactoring. Open
def fs_init
@guestOS = "Windows"
@rootFS = MiqFS.getFS(@rootVolume)
raise MiqException::MiqVmMountError, "WinMount: could not mount root volume" unless @rootFS
- Read upRead up
- Create a ticketCreate a ticket
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 readVBLK
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.readVBLK(disk, ph)
vblk = LdmScanner.readStruct(disk, LdmScanner::VBLK)
return if vblk.data_length == 0
buf = vblk.padding
- Create a ticketCreate a ticket