Showing 711 of 711 total issues
Method initialize
has a Cognitive Complexity of 135 (exceeds 8 allowed). Consider refactoring. Open
def initialize(_c, fs)
@users = []
@groups = []
# Extracted data also built into a human-readable format if uncommented
- 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 doUpdate
has a Cognitive Complexity of 116 (exceeds 8 allowed). Consider refactoring. Open
def doUpdate(cs)
#
# The directory where the collection will be created.
#
destDir = cs.todir
- 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
File VmConfig.rb
has 769 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'pathname'
require 'metadata/VMMount/VMMount'
require 'miq_unicode'
require 'manageiq/gems/pending'
require 'util/miq-xml'
- Create a ticketCreate a ticket
File peheader.rb
has 635 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'stringio'
require 'binary_struct'
require 'miq_unicode'
# Notes:
- Create a ticketCreate a ticket
File InitProcHash.rb
has 632 lines of code (exceeds 250 allowed). Consider refactoring. Open
module MiqLinux
InitProcHash = {
"2xthinclientserver" => "Supports thin clients",
"3dwm-server" => "Binary server daemon",
"acct" => "GNU Accounting utilities for process and login accounting",
- Create a ticketCreate a ticket
Method initialize
has a Cognitive Complexity of 69 (exceeds 8 allowed). Consider refactoring. Open
def initialize(fs)
@fs = fs
@os_type = "Linux"
@distribution = nil
@description = 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
File Win32Accounts.rb
has 593 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'manageiq/gems/pending'
require 'util/miq-xml'
require 'miq_unicode'
module MiqWin32
- Create a ticketCreate a ticket
File QcowDisk.rb
has 555 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'disk/modules/MiqLargeFile'
require 'memory_buffer'
require 'binary_struct'
require 'zlib'
- Create a ticketCreate a ticket
Method initialize
has a Cognitive Complexity of 58 (exceeds 8 allowed). Consider refactoring. Open
def initialize(fs)
@fs = fs
@scriptsByName = {}
#
- 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
File Win32EventLog.rb
has 516 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'sys-uname'
# For message table resources.
require 'metadata/util/win32/peheader'
- Create a ticketCreate a ticket
Class Superblock
has 57 methods (exceeds 20 allowed). Consider refactoring. Open
class Superblock
#
# Block I/O parameterization. A basic block (BB) is the lowest size of
# filesystem allocation, and must equal 512. Length units given to bio
# routines are in BB's.
- Create a ticketCreate a ticket
Class VmConfig
has 53 methods (exceeds 20 allowed). Consider refactoring. Open
class VmConfig
using ManageIQ::UnicodeString
attr_reader :configFile
- Create a ticketCreate a ticket
Method disk_files
has a Cognitive Complexity of 51 (exceeds 8 allowed). Consider refactoring. Open
def disk_files(miqvm = nil)
return @disk_files if @disk_files
@disk_files = []
if @direct_file_access
@disk_files = files(miqvm)
- 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
File ms-registry.rb
has 468 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'binary_struct'
require 'miq_unicode'
require 'manageiq/gems/pending'
require 'util/miq-xml'
require 'util/xml/xml_hash'
- Create a ticketCreate a ticket
File inode.rb
has 452 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'binary_struct'
require 'memory_buffer'
require 'more_core_extensions/all'
require 'fs/xfs/superblock'
require 'fs/xfs/bmap_btree_record'
- Create a ticketCreate a ticket
Class Inode
has 48 methods (exceeds 20 allowed). Consider refactoring. Open
class Inode
MAX_READ = 4_294_967_296
XFS_DINODE_MAGIC = 0x494e
# Bits 0 to 8 of file mode.
- Create a ticketCreate a ticket
File superblock.rb
has 434 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'binary_struct'
require 'uuidtools'
require 'stringio'
require 'memory_buffer'
require 'fs/xfs/allocation_group'
- Create a ticketCreate a ticket
Class MiqFS
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
class MiqFS
attr_accessor :fsType, :dobj, :fsId, :volName
#
# Class method to instantiate a MiqFS object
- Create a ticketCreate a ticket
Method openDisks
has a Cognitive Complexity of 44 (exceeds 8 allowed). Consider refactoring. Open
def openDisks(diskFiles)
pVolumes = []
$log.debug "openDisks: no disk files supplied." unless diskFiles
- 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
File MiqLdm.rb
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'ostruct'
require 'binary_struct'
require 'uuidtools'
class BinaryStruct
- Create a ticketCreate a ticket