irobayna/stupidedi

View on GitHub

Showing 171 of 292 total issues

Method mkconfig has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        def mkconfig(definition, functional_group_def, isa11, gs01, gs08, st01)
Severity: Minor
Found in lib/stupidedi/transaction_sets/validation/ambiguity.rb - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                    unless s.satisfied?(zipper)
                      raise Exceptions::ParseError,
                        "for #{zipper.node.descriptor}, #{s.reason(zipper)} at #{zipper.node.position.inspect}"
                    end
    Severity: Major
    Found in lib/stupidedi/parser/builder_dsl.rb - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                if zipper.node.invalid?
                  if zipper.up.node.invalid?
                    # parent is an InvalidEnvelopeVal
                    raise Exceptions::ParseError,
                      "#{zipper.first.node.reason} at #{zipper.first.node.position.inspect}"
      Severity: Major
      Found in lib/stupidedi/parser/builder_dsl.rb - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                elsif zipper.node.loop?
                  critique_occurences zipper, recursive
        
                elsif zipper.node.table?
                  critique_occurences zipper, recursive
        Severity: Major
        Found in lib/stupidedi/parser/builder_dsl.rb - About 45 mins to fix

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

                def pretty_print(q)
                  id = "% 3s" % @segment_id.to_s
          
                  unless @segment_use.nil?
                    width = 18
          Severity: Minor
          Found in lib/stupidedi/parser/instruction.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 initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                def initialize(definition, position, requirement, repeat_count, parent)
          Severity: Minor
          Found in lib/stupidedi/schema/segment_use.rb - About 35 mins to fix

            Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  def initialize(separators, segment_dict, instructions, zipper, children)
            Severity: Minor
            Found in lib/stupidedi/parser/states/transmission_state.rb - About 35 mins to fix

              Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    def initialize(separators, segment_dict, instructions, zipper, children)
              Severity: Minor
              Found in lib/stupidedi/parser/states/initial_state.rb - About 35 mins to fix

                Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      def initialize(separators, segment_dict, instructions, zipper, children)
                Severity: Minor
                Found in lib/stupidedi/parser/states/transaction_set_state.rb - About 35 mins to fix

                  Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        def initialize(separators, segment_dict, instructions, zipper, children)
                  Severity: Minor
                  Found in lib/stupidedi/parser/states/table_state.rb - About 35 mins to fix

                    Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                                def initialize(hour, minute, second, usage, position)
                    Severity: Minor
                    Found in lib/stupidedi/versions/common/element_types/tm.rb - About 35 mins to fix

                      Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                                  def initialize(year, month, day, usage, position)
                      Severity: Minor
                      Found in lib/stupidedi/versions/common/element_types/dt.rb - About 35 mins to fix

                        Method push has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                              def push(zipper, parent, segment_tok, segment_use, config)
                        Severity: Minor
                        Found in lib/stupidedi/parser/states/table_state.rb - About 35 mins to fix

                          Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  def initialize(machine, reader, isa_elements, gs_elements, st_elements)
                          Severity: Minor
                          Found in lib/stupidedi/transaction_sets/validation/ambiguity.rb - About 35 mins to fix

                            Method push has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                  def push(zipper, parent, segment_tok, segment_use, config)
                            Severity: Minor
                            Found in lib/stupidedi/parser/states/transmission_state.rb - About 35 mins to fix

                              Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                    def initialize(definition, requirement, repeat_count, allowed_values, parent)
                              Severity: Minor
                              Found in lib/stupidedi/schema/simple_element_use.rb - About 35 mins to fix

                                Method mod_element has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                      def mod_element(element_use, descriptor, requirement, name, arguments)
                                Severity: Minor
                                Found in lib/stupidedi/transaction_sets/builder.rb - About 35 mins to fix

                                  Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                        def initialize(separators, segment_dict, instructions, zipper, children)
                                  Severity: Minor
                                  Found in lib/stupidedi/parser/states/loop_state.rb - About 35 mins to fix

                                    Method push has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                          def push(zipper, parent, segment_tok, segment_use, config)
                                    Severity: Minor
                                    Found in lib/stupidedi/parser/states/transaction_set_state.rb - About 35 mins to fix

                                      Method push has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                            def push(zipper, parent, segment_tok, segment_use, config)
                                      Severity: Minor
                                      Found in lib/stupidedi/parser/states/loop_state.rb - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language