Showing 344 of 711 total issues
Method getClusters
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
def getClusters(start_vcn, end_vcn = nil)
end_vcn = start_vcn if end_vcn.nil?
# Single cluster
if start_vcn == end_vcn && @clusters.key?(start_vcn)
- 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 mftRecToBytePos
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
def mftRecToBytePos(recno)
# Return start of mft if rec 0 (no point in the rest of this).
return mftLoc if recno == 0
# Find which fragment contains the target mft record.
- 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 9 (exceeds 8 allowed). Consider refactoring. Open
def initialize(data, short_inode, sb, dots = nil, inode_number = nil)
#
# If dots is 1 or 2 we need to construct the
# "." and ".." directory entries.
#
- 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 9 (exceeds 8 allowed). Consider refactoring. Open
def initialize(buffer, sb)
@sb = sb
if defined? XFS_BTREE_LONG_PTRS
if @sb.version_has_crc?
@btree_block = BTREE_BLOCK_LONG.decode(buffer)
- 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"