kputnam/stupidedi

View on GitHub

Showing 121 of 291 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

      def delete
        if not last?
          # Move to `next`
          head, *tail = @path.right

Severity: Major
Found in lib/stupidedi/zipper/edited_cursor.rb and 1 other location - About 1 hr to fix
lib/stupidedi/zipper/memoized_cursor.rb on lines 106..126

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

      def delete
        if not last?
          # Move to `next`
          head, *tail = @path.right

Severity: Major
Found in lib/stupidedi/zipper/memoized_cursor.rb and 1 other location - About 1 hr to fix
lib/stupidedi/zipper/edited_cursor.rb on lines 130..150

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        q.group(2, "(", ")") do
          q.breakable ""
          @header_segment_uses.each do |e|
            unless q.current_group.first?
              q.text ","
Severity: Major
Found in lib/stupidedi/schema/interchange_def.rb and 1 other location - About 1 hr to fix
lib/stupidedi/schema/functional_group_def.rb on lines 97..118

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        q.group(2, "(", ")") do
          q.breakable ""
          @header_segment_uses.each do |e|
            unless q.current_group.first?
              q.text ","
Severity: Major
Found in lib/stupidedi/schema/functional_group_def.rb and 1 other location - About 1 hr to fix
lib/stupidedi/schema/interchange_def.rb on lines 76..97

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

          class Empty < Valid
            def value
              nil
            end

Severity: Major
Found in lib/stupidedi/versions/common/element_types/r.rb and 3 other locations - About 1 hr to fix
lib/stupidedi/versions/common/element_types/dt.rb on lines 152..187
lib/stupidedi/versions/common/element_types/nn.rb on lines 150..185
lib/stupidedi/versions/common/element_types/tm.rb on lines 133..168

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

          class Empty < Valid
            def value
              nil
            end

Severity: Major
Found in lib/stupidedi/versions/common/element_types/tm.rb and 3 other locations - About 1 hr to fix
lib/stupidedi/versions/common/element_types/dt.rb on lines 152..187
lib/stupidedi/versions/common/element_types/nn.rb on lines 150..185
lib/stupidedi/versions/common/element_types/r.rb on lines 147..182

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

          class Empty < Valid
            def value
              nil
            end

Severity: Major
Found in lib/stupidedi/versions/common/element_types/dt.rb and 3 other locations - About 1 hr to fix
lib/stupidedi/versions/common/element_types/nn.rb on lines 150..185
lib/stupidedi/versions/common/element_types/r.rb on lines 147..182
lib/stupidedi/versions/common/element_types/tm.rb on lines 133..168

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

          class Empty < Valid
            def value
              nil
            end

Severity: Major
Found in lib/stupidedi/versions/common/element_types/nn.rb and 3 other locations - About 1 hr to fix
lib/stupidedi/versions/common/element_types/dt.rb on lines 152..187
lib/stupidedi/versions/common/element_types/r.rb on lines 147..182
lib/stupidedi/versions/common/element_types/tm.rb on lines 133..168

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

          class Valid < FixnumVal
            def valid?
              true
            end

Severity: Major
Found in lib/stupidedi/versions/common/element_types/nn.rb and 2 other locations - About 1 hr to fix
lib/stupidedi/versions/common/element_types/dt.rb on lines 120..145
lib/stupidedi/versions/common/element_types/tm.rb on lines 105..130

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

          class Valid < TimeVal
            def valid?
              true
            end

Severity: Major
Found in lib/stupidedi/versions/common/element_types/tm.rb and 2 other locations - About 1 hr to fix
lib/stupidedi/versions/common/element_types/dt.rb on lines 120..145
lib/stupidedi/versions/common/element_types/nn.rb on lines 118..143

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

          class Valid < DateVal
            def valid?
              true
            end

Severity: Major
Found in lib/stupidedi/versions/common/element_types/dt.rb and 2 other locations - About 1 hr to fix
lib/stupidedi/versions/common/element_types/nn.rb on lines 118..143
lib/stupidedi/versions/common/element_types/tm.rb on lines 105..130

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  module Versions
    module FortyTen
      module ElementTypes
        DT               = Common::ElementTypes::DT
        DateVal          = Common::ElementTypes::DateVal
Severity: Major
Found in lib/stupidedi/versions/004010/element_types.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/element_types.rb on lines 3..25
lib/stupidedi/versions/003010/element_types.rb on lines 3..25
lib/stupidedi/versions/003040/element_types.rb on lines 3..25
lib/stupidedi/versions/003050/element_types.rb on lines 3..25
lib/stupidedi/versions/005010/element_types.rb on lines 3..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  module Versions
    module ThirtyTen
      module ElementTypes
        DT               = Common::ElementTypes::DT
        DateVal          = Common::ElementTypes::DateVal
Severity: Major
Found in lib/stupidedi/versions/003010/element_types.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/element_types.rb on lines 3..25
lib/stupidedi/versions/003040/element_types.rb on lines 3..25
lib/stupidedi/versions/003050/element_types.rb on lines 3..25
lib/stupidedi/versions/004010/element_types.rb on lines 3..25
lib/stupidedi/versions/005010/element_types.rb on lines 3..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  module Versions
    module ThirtyForty
      module ElementTypes
        DT               = Common::ElementTypes::DT
        DateVal          = Common::ElementTypes::DateVal
Severity: Major
Found in lib/stupidedi/versions/003040/element_types.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/element_types.rb on lines 3..25
lib/stupidedi/versions/003010/element_types.rb on lines 3..25
lib/stupidedi/versions/003050/element_types.rb on lines 3..25
lib/stupidedi/versions/004010/element_types.rb on lines 3..25
lib/stupidedi/versions/005010/element_types.rb on lines 3..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  module Versions
    module FiftyTen
      module ElementTypes
        DT               = Common::ElementTypes::DT
        DateVal          = Common::ElementTypes::DateVal
Severity: Major
Found in lib/stupidedi/versions/005010/element_types.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/element_types.rb on lines 3..25
lib/stupidedi/versions/003010/element_types.rb on lines 3..25
lib/stupidedi/versions/003040/element_types.rb on lines 3..25
lib/stupidedi/versions/003050/element_types.rb on lines 3..25
lib/stupidedi/versions/004010/element_types.rb on lines 3..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      class ISA
        attr_reader :id

        def initialize(parent, sequence)
          @count, @parent, @sequence, @id = 0, parent, sequence, sequence.value
Severity: Major
Found in lib/stupidedi/parser/identifier_stack.rb and 1 other location - About 1 hr to fix
lib/stupidedi/parser/identifier_stack.rb on lines 137..162

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  module Versions
    module ThirtyFifty
      module ElementTypes
        DT               = Common::ElementTypes::DT
        DateVal          = Common::ElementTypes::DateVal
Severity: Major
Found in lib/stupidedi/versions/003050/element_types.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/element_types.rb on lines 3..25
lib/stupidedi/versions/003010/element_types.rb on lines 3..25
lib/stupidedi/versions/003040/element_types.rb on lines 3..25
lib/stupidedi/versions/004010/element_types.rb on lines 3..25
lib/stupidedi/versions/005010/element_types.rb on lines 3..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                 [{:IK3=>
                    [{:E721=>{:name=>"Segment ID Code", :value=>{:raw=>"REF", :description=>"REF"}, :type=>:simple}},
                     {:E719=>{:name=>"Segment Position in Transaction Set", :value=>{:raw=>"57", :description=>nil}, :type=>:simple}},
                     {:E447=>{:name=>"Loop Identifier Code", :value=>{:raw=>"", :description=>nil}, :type=>:simple}},
                     {:E620=>{:name=>"Implementation Segment Syntax Error Code", :value=>{:raw=>"3", :description=>"Required Segment Missing"}, :type=>:simple}}]},
Severity: Major
Found in notes/json_writer/sample_output.rb and 1 other location - About 1 hr to fix
notes/json_writer/sample_output.rb on lines 57..61

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  module Versions
    module TwoThousandOne
      module ElementTypes
        DT               = Common::ElementTypes::DT
        DateVal          = Common::ElementTypes::DateVal
Severity: Major
Found in lib/stupidedi/versions/002001/element_types.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/003010/element_types.rb on lines 3..25
lib/stupidedi/versions/003040/element_types.rb on lines 3..25
lib/stupidedi/versions/003050/element_types.rb on lines 3..25
lib/stupidedi/versions/004010/element_types.rb on lines 3..25
lib/stupidedi/versions/005010/element_types.rb on lines 3..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      class GS
        attr_reader :id

        def initialize(parent, sequence)
          @count, @parent, @sequence, @id = 0, parent, sequence, sequence.value
Severity: Major
Found in lib/stupidedi/parser/identifier_stack.rb and 1 other location - About 1 hr to fix
lib/stupidedi/parser/identifier_stack.rb on lines 108..133

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language