newmen/versatile-diamond

View on GitHub
analyzer/lib/organizers/dependent_wrapped_spec.rb

Summary

Maintainability
C
1 day
Test Coverage

Class DependentWrappedSpec has 53 methods (exceeds 20 allowed). Consider refactoring.
Open

    class DependentWrappedSpec < DependentSpec
      include MinuendSpec

      # TODO: own there objects that described below are not used
      collector_methods :there, :child
Severity: Major
Found in analyzer/lib/organizers/dependent_wrapped_spec.rb - About 7 hrs to fix

    File dependent_wrapped_spec.rb has 302 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    module VersatileDiamond
      using Patches::RichArray
    
      module Organizers
    
    
    Severity: Minor
    Found in analyzer/lib/organizers/dependent_wrapped_spec.rb - About 3 hrs to fix

      Method select_skipped_zip has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      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?
      
      
      Severity: Minor
      Found in analyzer/lib/organizers/dependent_wrapped_spec.rb - About 45 mins to fix

      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

      There are no issues that match your filters.

      Category
      Status