Showing 6 of 6 total issues
Class SharedMemoryIO
has 62 methods (exceeds 20 allowed). Consider refactoring. Open
class SharedMemoryIO
attr_accessor :pos
attr_reader :mem
Method error_check_bootstrap
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def self.error_check_bootstrap(*syms, &is_err)
unless block_given?
is_err = lambda { |v| (v != KERN_SUCCESS) }
end
- 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 initialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def initialize(type_or_count = 1, count = 1)
super(type_or_count, count)
# See https://github.com/ffi/ffi/issues/118
ffi_type = FFI.find_type(self.type)
- 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 try_wait
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def try_wait(timeout = nil)
secs = timeout ? timeout : 0
begin
# TODO catch and convert exceptions...
timedwait(secs)
- 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 error_check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def error_check(*syms, &is_err)
unless block_given?
is_err = lambda { |v| (v == -1) }
end
- 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 error_check
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.error_check(*syms, &is_err)
unless block_given?
is_err = lambda { |v| (v != KERN_SUCCESS) }
end
- 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"