gavinlaking/vedeu

View on GitHub

Showing 47 of 67 total issues

Class Configuration has 42 methods (exceeds 20 allowed). Consider refactoring.
Open

  class Configuration

    include Singleton

    class << self
Severity: Minor
Found in lib/vedeu/configuration/configuration.rb - About 5 hrs to fix

    Class API has 40 methods (exceeds 20 allowed). Consider refactoring.
    Open

        class API
    
          include Vedeu::Common
    
          # @param (see #initialize)
    Severity: Minor
    Found in lib/vedeu/configuration/api.rb - About 5 hrs to fix

      Class DSL has 29 methods (exceeds 20 allowed). Consider refactoring.
      Open

          class DSL
      
            include Vedeu::DSL
            include Vedeu::DSL::Border
            include Vedeu::DSL::Presentation
      Severity: Minor
      Found in lib/vedeu/borders/dsl.rb - About 3 hrs to fix

        Class Cursor has 24 methods (exceeds 20 allowed). Consider refactoring.
        Open

            class Cursor
        
              include Vedeu::Repositories::Model
              include Vedeu::Toggleable
              extend Forwardable
        Severity: Minor
        Found in lib/vedeu/cursors/cursor.rb - About 2 hrs to fix

          Class Document has 23 methods (exceeds 20 allowed). Consider refactoring.
          Open

              class Document
          
                include Vedeu::Repositories::Defaults
                include Vedeu::Repositories::Model
                extend Forwardable
          Severity: Minor
          Found in lib/vedeu/editor/document.rb - About 2 hrs to fix

            Class Alignment has 22 methods (exceeds 20 allowed). Consider refactoring.
            Open

                class Alignment
            
                  include Vedeu::Common
            
                  # @!attribute [r] value
            Severity: Minor
            Found in lib/vedeu/coercers/alignment.rb - About 2 hrs to fix

              Class Attributes has 21 methods (exceeds 20 allowed). Consider refactoring.
              Open

                  class Attributes
              
                    include Vedeu::Common
              
                    # @param (see #initialize)
              Severity: Minor
              Found in lib/vedeu/dsl/helpers/attributes.rb - About 2 hrs to fix

                Class Move has 21 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    class Move
                
                      include Vedeu::Repositories::Defaults
                      extend Forwardable
                
                
                Severity: Minor
                Found in lib/vedeu/geometries/move.rb - About 2 hrs to fix

                  Method coerce has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                          def coerce(collection = [], parent = nil, name = nil)
                            if collection.is_a?(Vedeu::Views::Streams)
                              collection
                  
                            elsif array?(collection)
                  Severity: Minor
                  Found in lib/vedeu/views/streams.rb - About 2 hrs 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

                  Method coerce has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                          def coerce(collection = [], parent = nil, name = nil)
                            if collection.is_a?(Vedeu::Views::Chars)
                              collection
                  
                            elsif array?(collection)
                  Severity: Minor
                  Found in lib/vedeu/views/chars.rb - About 1 hr 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

                  Method coerce has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                  Open

                          def coerce(collection = [], parent = nil, name = nil)
                            if collection.is_a?(Vedeu::Views::Lines)
                              collection
                  
                            elsif collection.is_a?(Vedeu::Views::Streams)
                  Severity: Minor
                  Found in lib/vedeu/views/lines.rb - About 1 hr 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

                  Method attributes has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                  Open

                        def attributes
                          {
                            client:               client,
                            height:               @height.is_a?(Proc) ? @height.call : @height,
                            horizontal_alignment: horizontal_alignment,
                  Severity: Minor
                  Found in lib/vedeu/geometries/geometry.rb - About 1 hr 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

                  Method defaults has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def defaults
                        {
                          background:    :default,
                          base_path:     base_path,
                          colour_mode:   detect_colour_mode,
                  Severity: Minor
                  Found in lib/vedeu/configuration/configuration.rb - About 1 hr to fix

                    Method coerce has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                          def coerce
                            if coerced?
                              value
                    
                            elsif hash?(value)
                    Severity: Minor
                    Found in lib/vedeu/coercers/style.rb - About 1 hr 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

                    Method read has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                          def read
                            Vedeu.log(type: :input, message: "Waiting for user input...\n")
                    
                            if raw_mode?
                              Vedeu.trigger(:_keypress_, keypress)
                    Severity: Minor
                    Found in lib/vedeu/input/capture.rb - About 1 hr 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

                    Method coerce has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            def coerce(collection = [], parent = nil, name = nil)
                              if collection.is_a?(Vedeu::Views::Streams)
                                collection
                    
                              elsif array?(collection)
                    Severity: Minor
                    Found in lib/vedeu/views/streams.rb - About 1 hr to fix

                      Method parse has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                            def parse
                              lines_collection = Vedeu::Views::Lines.new
                      
                              lines.each do |line|
                                line_object = Vedeu::Views::Line.new
                      Severity: Minor
                      Found in lib/vedeu/templating/view_template.rb - About 55 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

                      Method loggable? has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                            def loggable?(type)
                              return false unless log?
                              return false unless Vedeu::LOG_TYPES_KEYS.include?(type)
                              return true  if log_only.empty? && log_except.empty?
                      
                      
                      Severity: Minor
                      Found in lib/vedeu/configuration/configuration.rb - About 55 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

                      Method add has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                            def add(name, focus = false)
                              if registered?(name)
                                return storage unless focus
                      
                                by_name(name)
                      Severity: Minor
                      Found in lib/vedeu/models/focus.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

                      Method bordered_width has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                            def bordered_width
                              return width unless border && enabled?
                      
                              if left? && right?
                                width - 2
                      Severity: Minor
                      Found in lib/vedeu/geometries/area/area.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

                      Severity
                      Category
                      Status
                      Source
                      Language