Showing 5 of 296 total issues
Method main_event_loop
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def main_event_loop
Celluloid.boot
setup_signal_handler
start_supervisor
- 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 default_configuration
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def default_configuration
{
server: {
user: "guest",
password: "guest",
Method set
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def set(arg, value, overwrite = true)
*key_path, last = arg.is_a?(String) ? arg.split(".") : arg
if overwrite
key_path.inject(self) { |h, key| h.key?(key) ? h[key] : h[key] = {} } [last] = value
else
- 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 load_more!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_more!(args = {})
return unless args[:pattern]
Dir.glob(args[:pattern]).sort.each do |name|
next if File.directory?(name)
- 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 publish
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def publish(args = {})
# keep connection once established
unless @connection
@connection = create_bunny_connection
@connection.start
- 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"