YorickPeterse/ruby-lint

View on GitHub

Showing 2,084 of 2,162 total issues

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

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

    klass.define_method('inherited') do |method|
      method.define_argument('subclass')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 1 other location - About 1 day to fix
lib/ruby-lint/definitions/rails/active_record.rb on lines 9864..10038

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

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

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 1 day to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 231..402

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

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

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 1 day to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 1701..1872

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

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

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

    klass.define_method('cd') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/core/file_utils.rb and 3 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/file_utils.rb on lines 594..770
lib/ruby-lint/definitions/core/file_utils.rb on lines 982..1158
lib/ruby-lint/definitions/core/file_utils.rb on lines 1273..1449

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

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

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

    klass.define_method('cd') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/core/file_utils.rb and 3 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/file_utils.rb on lines 288..464
lib/ruby-lint/definitions/core/file_utils.rb on lines 982..1158
lib/ruby-lint/definitions/core/file_utils.rb on lines 1273..1449

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

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

  defs.define_constant('FileUtils::Verbose::NoWrite') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('cd') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/core/file_utils.rb and 3 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/file_utils.rb on lines 288..464
lib/ruby-lint/definitions/core/file_utils.rb on lines 594..770
lib/ruby-lint/definitions/core/file_utils.rb on lines 982..1158

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

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

  defs.define_constant('FileUtils::Verbose::DryRun') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('cd') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/core/file_utils.rb and 3 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/file_utils.rb on lines 288..464
lib/ruby-lint/definitions/core/file_utils.rb on lines 594..770
lib/ruby-lint/definitions/core/file_utils.rb on lines 1273..1449

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

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

    klass.define_instance_method('_insert_callbacks') do |method|
      method.define_argument('callbacks')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_mailer.rb and 1 other location - About 1 day to fix
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 111..248

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

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

    klass.define_instance_method('_insert_callbacks') do |method|
      method.define_argument('callbacks')
Severity: Major
Found in lib/ruby-lint/definitions/rails/abstract_controller.rb and 1 other location - About 1 day to fix
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 539..676

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 1 other location - About 1 day to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7156..7282

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 1 other location - About 1 day to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 367..493

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

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/core/syck.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/hash.rb on lines 304..428
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 709..833
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

  defs.define_constant('Syck::Set::Entries') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/core/syck.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/hash.rb on lines 304..428
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/core/hash.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 709..833
lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

  defs.define_constant('Sprockets::Railtie::OrderedOptions::Entries') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/sprockets.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/hash.rb on lines 304..428
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 709..833
lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042

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

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/hash.rb on lines 304..428
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 709..833
lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/hash.rb on lines 304..428
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 709..833
lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/hash.rb on lines 304..428
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 709..833
lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/hash.rb on lines 304..428
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 709..833
lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

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

    klass.define_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 10 other locations - About 1 day to fix
lib/ruby-lint/definitions/core/hash.rb on lines 304..428
lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
lib/ruby-lint/definitions/core/syck.rb on lines 709..833
lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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