YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('Rails::Engine::Railties') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_method('engines')
Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1110..1142
lib/ruby-lint/definitions/rails/rails.rb on lines 523..555

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

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('Devise::Engine::Railties') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_method('engines')
Severity: Major
Found in lib/ruby-lint/definitions/gems/devise.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/rails.rb on lines 523..555
lib/ruby-lint/definitions/rails/rails.rb on lines 916..948

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

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('OpenSSL::Cipher') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/core/open_ssl.rb on lines 3388..3437

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

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('OpenSSL::X509::CRL') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/core/open_ssl.rb on lines 831..880

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

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

  defs.define_constant('ActionView::TestCase::TestController::Fragments') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('expire_fragment') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 4 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 725..755
lib/ruby-lint/definitions/rails/action_controller.rb on lines 861..891
lib/ruby-lint/definitions/rails/rails.rb on lines 1294..1324
lib/ruby-lint/definitions/rails/rails.rb on lines 2356..2386

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

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

    klass.define_instance_method('active?')

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 1271..1314

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

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('Mongoid::Criteria::Proxy') do |klass|
    klass.inherits(defs.constant_proxy('BasicObject', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Mongoid::Sessions::Options::Threaded', RubyLint.registry))

    klass.define_method('const_missing') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8398..8427

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

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

  defs.define_constant('ActionController::Caching::Fragments') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('expire_fragment') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 4 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 725..755
lib/ruby-lint/definitions/rails/action_view.rb on lines 7166..7196
lib/ruby-lint/definitions/rails/rails.rb on lines 1294..1324
lib/ruby-lint/definitions/rails/rails.rb on lines 2356..2386

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

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

  defs.define_constant('Rails::InfoController::Fragments') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('expire_fragment') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 4 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 725..755
lib/ruby-lint/definitions/rails/action_controller.rb on lines 861..891
lib/ruby-lint/definitions/rails/action_view.rb on lines 7166..7196
lib/ruby-lint/definitions/rails/rails.rb on lines 2356..2386

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

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

  defs.define_constant('ActionController::Base::Fragments') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('expire_fragment') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 4 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 861..891
lib/ruby-lint/definitions/rails/action_view.rb on lines 7166..7196
lib/ruby-lint/definitions/rails/rails.rb on lines 1294..1324
lib/ruby-lint/definitions/rails/rails.rb on lines 2356..2386

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

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

  defs.define_constant('Rails::WelcomeController::Fragments') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('expire_fragment') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 4 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 725..755
lib/ruby-lint/definitions/rails/action_controller.rb on lines 861..891
lib/ruby-lint/definitions/rails/action_view.rb on lines 7166..7196
lib/ruby-lint/definitions/rails/rails.rb on lines 1294..1324

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

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

    klass.define_instance_method('active?')

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 2527..2570

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

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('Mongoid::Sessions::Options::Proxy') do |klass|
    klass.inherits(defs.constant_proxy('BasicObject', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Mongoid::Sessions::Options::Threaded', RubyLint.registry))

    klass.define_method('const_missing') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3084..3113

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

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::DeprecationFormatter::GeneratedDeprecationMessage::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 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::Hook::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 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::MessageNotification::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 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::SummaryNotification::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 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::DeprecationFormatter::SpecifiedDeprecationMessage::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 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::SeedNotification::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 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::SkippedExampleNotification::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 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

Severity
Category
Status
Source
Language