analyzer/lib/organizers/dependent_wrapped_spec.rb
Class DependentWrappedSpec
has 53 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class DependentWrappedSpec < DependentSpec
include MinuendSpec
# TODO: own there objects that described below are not used
collector_methods :there, :child
File dependent_wrapped_spec.rb
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module VersatileDiamond
using Patches::RichArray
module Organizers
Method select_skipped_zip
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def select_skipped_zip
parents_skipped_zip.each_with_object([]) do |(parent, twins_to_atoms), acc|
parent_mains = main_groups[parent] || []
next unless parent_mains.empty?
- 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"