YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('RSpec::Core::Notifications::FailedExampleNotification::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Hooks::BeforeHook::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Invocations::PrintHelp::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Formatters::BisectFormatter::RunResults::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Hooks::Hook::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Hooks::AfterHook::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Notifications::DeprecationNotification::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Hooks::AroundHook::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Notifications::SeedNotification::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::SharedContext::Recording::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Notifications::SummaryNotification::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Notifications::SkippedExampleNotification::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('RSpec::Core::Notifications::StartNotification::Passwd') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

  defs.define_constant('ActiveRecord::Associations::AssociationScope') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::JoinHelper', RubyLint.registry))

    klass.define_instance_method('active_record') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 2 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/active_record.rb on lines 1815..1873
lib/ruby-lint/definitions/rails/active_record.rb on lines 9460..9518

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

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

  defs.define_constant('ActiveRecord::SchemaMigration::AssociationScope') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::JoinHelper', RubyLint.registry))

    klass.define_instance_method('active_record') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 2 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/active_record.rb on lines 349..407
lib/ruby-lint/definitions/rails/active_record.rb on lines 1815..1873

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

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

  defs.define_constant('ActiveRecord::Base::AssociationScope') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::JoinHelper', RubyLint.registry))

    klass.define_instance_method('active_record') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 2 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/active_record.rb on lines 349..407
lib/ruby-lint/definitions/rails/active_record.rb on lines 9460..9518

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

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

  defs.define_constant('Gem::Version::Requirement') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('create') do |method|
      method.define_argument('input')
Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 1 other location - About 4 hrs to fix
lib/ruby-lint/definitions/core/gem.rb on lines 1660..1731

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

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