YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('ActiveSupport::OrderedHash::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

  defs.define_constant('OptionParser::OptionMap::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/core/option_parser.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

  defs.define_constant('Mongoid::Atomic::Modifiers::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

  defs.define_constant('ActiveSupport::HashWithIndifferentAccess::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

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

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

  defs.define_constant('OptionParser::CompletingHash::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/core/option_parser.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

  defs.define_constant('ActiveSupport::OrderedOptions::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

  defs.define_constant('ActiveSupport::InheritableOptions::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

  defs.define_constant('Syck::SpecialHash::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/core/syck.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/hash.rb on lines 256..301
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

  defs.define_constant('Hash::Bucket') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('delete') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/core/hash.rb and 12 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 323..368
lib/ruby-lint/definitions/core/option_parser.rb on lines 793..838
lib/ruby-lint/definitions/core/syck.rb on lines 661..706
lib/ruby-lint/definitions/core/syck.rb on lines 963..1008
lib/ruby-lint/definitions/gems/mongoid.rb on lines 309..354
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7098..7143
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1937..1982
lib/ruby-lint/definitions/rails/active_support.rb on lines 1905..1950
lib/ruby-lint/definitions/rails/active_support.rb on lines 2339..2384
lib/ruby-lint/definitions/rails/active_support.rb on lines 3566..3611
lib/ruby-lint/definitions/rails/active_support.rb on lines 3870..3915
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1330..1375

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

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

    klass.define_instance_method('all') do |method|
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 1810..1847
lib/ruby-lint/definitions/rails/action_view.rb on lines 7072..7109
lib/ruby-lint/definitions/rails/rails.rb on lines 1200..1237
lib/ruby-lint/definitions/rails/rails.rb on lines 2262..2299

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

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

    klass.define_instance_method('all') do |method|
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 631..668
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1810..1847
lib/ruby-lint/definitions/rails/rails.rb on lines 1200..1237
lib/ruby-lint/definitions/rails/rails.rb on lines 2262..2299

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

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

    klass.define_instance_method('all') do |method|
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 631..668
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1810..1847
lib/ruby-lint/definitions/rails/action_view.rb on lines 7072..7109
lib/ruby-lint/definitions/rails/rails.rb on lines 1200..1237

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

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

    klass.define_instance_method('all') do |method|
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 631..668
lib/ruby-lint/definitions/rails/action_view.rb on lines 7072..7109
lib/ruby-lint/definitions/rails/rails.rb on lines 1200..1237
lib/ruby-lint/definitions/rails/rails.rb on lines 2262..2299

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

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

    klass.define_instance_method('all') do |method|
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 631..668
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1810..1847
lib/ruby-lint/definitions/rails/action_view.rb on lines 7072..7109
lib/ruby-lint/definitions/rails/rails.rb on lines 2262..2299

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

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('ActionView::Base::DateTimeSelector') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActionView::Helpers::TagHelper', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActionView::Helpers::CaptureHelper', RubyLint.registry))

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 5783..5824

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

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('ActionView::TestCase::DateTimeSelector') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActionView::Helpers::TagHelper', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActionView::Helpers::CaptureHelper', RubyLint.registry))

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 867..908

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('validates_absence_of') do |method|
      method.define_rest_argument('attr_names')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/active_model.rb on lines 1365..1405
lib/ruby-lint/definitions/rails/active_record.rb on lines 2537..2577

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

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

    klass.define_instance_method('validates_absence_of') do |method|
      method.define_rest_argument('attr_names')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_model.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/active_record.rb on lines 2537..2577
lib/ruby-lint/definitions/rails/active_record.rb on lines 10187..10227

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('validates_absence_of') do |method|
      method.define_rest_argument('attr_names')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/active_model.rb on lines 1365..1405
lib/ruby-lint/definitions/rails/active_record.rb on lines 10187..10227

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

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