Method exec!
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def exec!
# The signal handler MUST be installed before spawning a new process
SignalHandler.setup!
if RUBY_PLATFORM =~ /linux/i && @options.delete(:close_others)
- 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
File child.rb
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'eventmachine'
require 'posix/spawn'
module EventMachine
Method exec!
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exec!
# The signal handler MUST be installed before spawning a new process
SignalHandler.setup!
if RUBY_PLATFORM =~ /linux/i && @options.delete(:close_others)
Method setup!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def setup!
@pipe = ::IO.pipe
@notifier = ::EM.watch @pipe[0], SignalNotifier, self
@notifier.notify_readable = true
- 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 signal
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def signal
# The SIGCHLD handler may not be called exactly once for every
# child. I.e., multiple children exiting concurrently may trigger
# only one SIGCHLD in the parent. Therefore, reap all processes
# that can be reaped.
- 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"