irobayna/stupidedi

View on GitHub

Showing 121 of 292 total issues

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 7 locations. Consider refactoring.
Open

    class TableState < AbstractState
      # @return [Reader::Separators]
      attr_reader :separators

      # @return [Reader::SegmentDict]
Severity: Major
Found in lib/stupidedi/parser/states/table_state.rb and 6 other locations - About 1 hr to fix
lib/stupidedi/parser/states/failure_state.rb on lines 6..33
lib/stupidedi/parser/states/initial_state.rb on lines 6..34
lib/stupidedi/parser/states/interchange_state.rb on lines 6..34
lib/stupidedi/parser/states/loop_state.rb on lines 6..34
lib/stupidedi/parser/states/transaction_set_state.rb on lines 6..34
lib/stupidedi/parser/states/transmission_state.rb on lines 6..34

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 53.

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 7 locations. Consider refactoring.
Open

    class LoopState < AbstractState
      # @return [Reader::Separators]
      attr_reader :separators

      # @return [Reader::SegmentDict]
Severity: Major
Found in lib/stupidedi/parser/states/loop_state.rb and 6 other locations - About 1 hr to fix
lib/stupidedi/parser/states/failure_state.rb on lines 6..33
lib/stupidedi/parser/states/initial_state.rb on lines 6..34
lib/stupidedi/parser/states/interchange_state.rb on lines 6..34
lib/stupidedi/parser/states/table_state.rb on lines 6..34
lib/stupidedi/parser/states/transaction_set_state.rb on lines 6..34
lib/stupidedi/parser/states/transmission_state.rb on lines 6..34

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 53.

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 7 locations. Consider refactoring.
Open

    class InitialState < AbstractState
      # @return [Reader::Separators]
      attr_reader :separators

      # @return [Reader::SegmentDict]
Severity: Major
Found in lib/stupidedi/parser/states/initial_state.rb and 6 other locations - About 1 hr to fix
lib/stupidedi/parser/states/failure_state.rb on lines 6..33
lib/stupidedi/parser/states/interchange_state.rb on lines 6..34
lib/stupidedi/parser/states/loop_state.rb on lines 6..34
lib/stupidedi/parser/states/table_state.rb on lines 6..34
lib/stupidedi/parser/states/transaction_set_state.rb on lines 6..34
lib/stupidedi/parser/states/transmission_state.rb on lines 6..34

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 53.

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 7 locations. Consider refactoring.
Open

    class FailureState < AbstractState
      # @return [Reader::Separators]
      attr_reader :separators

      # @return [Reader::SegmentDict]
Severity: Major
Found in lib/stupidedi/parser/states/failure_state.rb and 6 other locations - About 1 hr to fix
lib/stupidedi/parser/states/initial_state.rb on lines 6..34
lib/stupidedi/parser/states/interchange_state.rb on lines 6..34
lib/stupidedi/parser/states/loop_state.rb on lines 6..34
lib/stupidedi/parser/states/table_state.rb on lines 6..34
lib/stupidedi/parser/states/transaction_set_state.rb on lines 6..34
lib/stupidedi/parser/states/transmission_state.rb on lines 6..34

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 53.

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 7 locations. Consider refactoring.
Open

    class TransactionSetState < AbstractState
      # @return [Reader::Separators]
      attr_reader :separators

      # @return [Reader::SegmentDict]
Severity: Major
Found in lib/stupidedi/parser/states/transaction_set_state.rb and 6 other locations - About 1 hr to fix
lib/stupidedi/parser/states/failure_state.rb on lines 6..33
lib/stupidedi/parser/states/initial_state.rb on lines 6..34
lib/stupidedi/parser/states/interchange_state.rb on lines 6..34
lib/stupidedi/parser/states/loop_state.rb on lines 6..34
lib/stupidedi/parser/states/table_state.rb on lines 6..34
lib/stupidedi/parser/states/transmission_state.rb on lines 6..34

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 53.

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 7 locations. Consider refactoring.
Open

    class InterchangeState < AbstractState
      # @return [Reader::Separators]
      attr_reader :separators

      # @return [Reader::SegmentDict]
Severity: Major
Found in lib/stupidedi/parser/states/interchange_state.rb and 6 other locations - About 1 hr to fix
lib/stupidedi/parser/states/failure_state.rb on lines 6..33
lib/stupidedi/parser/states/initial_state.rb on lines 6..34
lib/stupidedi/parser/states/loop_state.rb on lines 6..34
lib/stupidedi/parser/states/table_state.rb on lines 6..34
lib/stupidedi/parser/states/transaction_set_state.rb on lines 6..34
lib/stupidedi/parser/states/transmission_state.rb on lines 6..34

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 53.

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 7 locations. Consider refactoring.
Open

    class TransmissionState < AbstractState
      # @return [Reader::Separators]
      attr_reader :separators

      # @return [Reader::SegmentDict]
Severity: Major
Found in lib/stupidedi/parser/states/transmission_state.rb and 6 other locations - About 1 hr to fix
lib/stupidedi/parser/states/failure_state.rb on lines 6..33
lib/stupidedi/parser/states/initial_state.rb on lines 6..34
lib/stupidedi/parser/states/interchange_state.rb on lines 6..34
lib/stupidedi/parser/states/loop_state.rb on lines 6..34
lib/stupidedi/parser/states/table_state.rb on lines 6..34
lib/stupidedi/parser/states/transaction_set_state.rb on lines 6..34

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 53.

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

            map = Hash.new{|h,k| h[k] = instructions }

            instructions.each do |i|
              element_use = i.segment_use.definition.element_uses.at(n)
              unless m.nil?
Severity: Major
Found in lib/stupidedi/parser/constraint_table.rb and 1 other location - About 1 hr to fix
lib/stupidedi/parser/constraint_table.rb on lines 397..415

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 51.

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

      def initialize(id, repeat_count, header_segment_uses, loop_defs, trailer_segment_uses, parent)
        @id, @repeat_count, @header_segment_uses, @loop_defs, @trailer_segment_uses, @parent =
          id, repeat_count, header_segment_uses, loop_defs, trailer_segment_uses, parent

        # Delay re-parenting until the entire definition tree has a root
Severity: Major
Found in lib/stupidedi/schema/loop_def.rb and 1 other location - About 1 hr to fix
lib/stupidedi/schema/table_def.rb on lines 25..34

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 51.

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

            map = Hash.new{|h,k| h[k] = instructions }

            instructions.each do |i|
              element_use  = i.segment_use.definition.element_uses.at(n)

Severity: Major
Found in lib/stupidedi/parser/constraint_table.rb and 1 other location - About 1 hr to fix
lib/stupidedi/parser/constraint_table.rb on lines 351..368

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 51.

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

      def initialize(id, position, header_segment_uses, loop_defs, trailer_segment_uses, parent)
        @id, @position, @header_segment_uses, @loop_defs, @trailer_segment_uses, @parent =
          id, position, header_segment_uses, loop_defs, trailer_segment_uses, parent

        # Delay re-parenting until the entire definition tree has a root
Severity: Major
Found in lib/stupidedi/schema/table_def.rb and 1 other location - About 1 hr to fix
lib/stupidedi/schema/loop_def.rb on lines 35..44

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 51.

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
      s = Schema
      r = ElementReqs

Severity: Major
Found in lib/stupidedi/versions/003010/functional_group_def.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003040/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003050/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/004010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/005010/functional_group_def.rb on lines 3..20

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 47.

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
      s = Schema
      r = ElementReqs

Severity: Major
Found in lib/stupidedi/versions/003050/functional_group_def.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003040/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/004010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/005010/functional_group_def.rb on lines 3..20

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 47.

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
      s = Schema
      r = ElementReqs

Severity: Major
Found in lib/stupidedi/versions/002001/functional_group_def.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/003010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003040/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003050/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/004010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/005010/functional_group_def.rb on lines 3..20

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 47.

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
      s = Schema
      r = ElementReqs

Severity: Major
Found in lib/stupidedi/versions/004010/functional_group_def.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003040/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003050/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/005010/functional_group_def.rb on lines 3..20

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 47.

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
      s = Schema
      r = ElementReqs

Severity: Major
Found in lib/stupidedi/versions/003040/functional_group_def.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003050/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/004010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/005010/functional_group_def.rb on lines 3..20

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 47.

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
      s = Schema
      r = ElementReqs

Severity: Major
Found in lib/stupidedi/versions/005010/functional_group_def.rb and 5 other locations - About 1 hr to fix
lib/stupidedi/versions/002001/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003010/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003040/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/003050/functional_group_def.rb on lines 3..20
lib/stupidedi/versions/004010/functional_group_def.rb on lines 3..20

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 47.

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

    methods.each do |name|
      name = name.slice(1..-1)

      object = register(YARD::CodeObjects::MethodObject.new(namespace, name, scope)) do |o|
        o.visibility = visibility
Severity: Minor
Found in build/doc/lib/meta-plugin/lib/yard-meta/legacy.rb and 1 other location - About 55 mins to fix
build/doc/lib/meta-plugin/lib/yard-meta/handler.rb on lines 96..106

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 45.

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

b.machine.parent.flatmap(&:parent).flatmap(&:parent).flatmap(&:zipper).tap do |z|
  separators =
    Stupidedi::Reader::Separators.build(:segment => "~\n",
                                        :element => "*",
                                        :component => ":",
Severity: Minor
Found in notes/generator.rb and 1 other location - About 55 mins to fix
notes/generator.rb on lines 95..104

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 45.

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