YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Hooks::AfterHook::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Hooks::AfterContextHook::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Notifications::GroupNotification::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Notifications::StartNotification::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('Celluloid::StackDump::ThreadState::Tms') 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/celluloid.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Notifications::PendingExampleFixedNotification::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Source::Location::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373

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

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

  defs.define_constant('Celluloid::StackDump::TaskState::Tms') 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/celluloid.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Notifications::CustomNotification::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Notifications::FailedExampleNotification::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Formatters::BisectFormatter::RunResults::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Hooks::AroundHook::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Hooks::BeforeHook::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Notifications::ExampleNotification::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::SharedContext::Recording::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Invocations::PrintHelp::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5702..5738
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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

  defs.define_constant('RSpec::Core::Notifications::DeprecationNotification::Tms') 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 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3966..4002
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4114..4150
lib/ruby-lint/definitions/gems/rspec.rb on lines 2417..2453
lib/ruby-lint/definitions/gems/rspec.rb on lines 2701..2737
lib/ruby-lint/definitions/gems/rspec.rb on lines 2935..2971
lib/ruby-lint/definitions/gems/rspec.rb on lines 4000..4036
lib/ruby-lint/definitions/gems/rspec.rb on lines 4168..4204
lib/ruby-lint/definitions/gems/rspec.rb on lines 4339..4375
lib/ruby-lint/definitions/gems/rspec.rb on lines 4507..4543
lib/ruby-lint/definitions/gems/rspec.rb on lines 4695..4731
lib/ruby-lint/definitions/gems/rspec.rb on lines 5029..5065
lib/ruby-lint/definitions/gems/rspec.rb on lines 5504..5540
lib/ruby-lint/definitions/gems/rspec.rb on lines 5882..5918
lib/ruby-lint/definitions/gems/rspec.rb on lines 6110..6146
lib/ruby-lint/definitions/gems/rspec.rb on lines 6292..6328
lib/ruby-lint/definitions/gems/rspec.rb on lines 6474..6510
lib/ruby-lint/definitions/gems/rspec.rb on lines 6653..6689
lib/ruby-lint/definitions/gems/rspec.rb on lines 6818..6854
lib/ruby-lint/definitions/gems/rspec.rb on lines 7035..7071
lib/ruby-lint/definitions/gems/rspec.rb on lines 7210..7246
lib/ruby-lint/definitions/gems/rspec.rb on lines 7398..7434
lib/ruby-lint/definitions/gems/rspec.rb on lines 7634..7670
lib/ruby-lint/definitions/gems/rspec.rb on lines 8337..8373
lib/ruby-lint/definitions/gems/rspec.rb on lines 8712..8748

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

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('URI::MailTo') do |klass|
    klass.inherits(defs.constant_proxy('URI::Generic', RubyLint.registry))

    klass.define_method('build') do |method|
      method.define_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/uri.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/core/uri.rb on lines 883..920

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

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('Celluloid::PoolManager::Mailbox') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('<<') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 1464..1501

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

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