YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('Mongoid::QueryCache::CachedCursor::Enumerator') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 496..531
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1633..1668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1813..1848
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2311..2346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2584..2619
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7285..7320
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8143..8178
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1308..1343

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

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

  defs.define_constant('Mongoid::Relations::Metadata::Enumerator') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 496..531
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1633..1668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1813..1848
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2311..2346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2584..2619
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5705..5740
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8143..8178
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1308..1343

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

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

  defs.define_constant('Mongoid::Contextual::Memory::Enumerator') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 496..531
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1633..1668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2311..2346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2584..2619
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5705..5740
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7285..7320
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8143..8178
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1308..1343

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

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

  defs.define_constant('Mongoid::Contextual::TextSearch::Enumerator') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 496..531
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1633..1668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1813..1848
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2584..2619
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5705..5740
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7285..7320
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8143..8178
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1308..1343

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

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

  defs.define_constant('Sinatra::ExtendedRack::Enumerator') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/sinatra.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 496..531
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1633..1668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1813..1848
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2311..2346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2584..2619
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5705..5740
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7285..7320
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8143..8178

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

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

  defs.define_constant('Mongoid::Criteria::Enumerator') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 496..531
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1633..1668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1813..1848
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2311..2346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5705..5740
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7285..7320
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8143..8178
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1308..1343

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

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

  defs.define_constant('Mongoid::Relations::Targets::Enumerable::Enumerator') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 496..531
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1633..1668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1813..1848
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2311..2346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2584..2619
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5705..5740
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7285..7320
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1308..1343

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

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

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

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1633..1668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1813..1848
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2311..2346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2584..2619
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5705..5740
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7285..7320
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8143..8178
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1308..1343

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

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

  defs.define_constant('Mongoid::Contextual::MapReduce::Enumerator') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

    klass.define_instance_method('each') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 11 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 496..531
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1512..1547
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1813..1848
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2065..2100
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2195..2230
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2311..2346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 2584..2619
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5705..5740
lib/ruby-lint/definitions/gems/mongoid.rb on lines 7285..7320
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8143..8178
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1308..1343

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

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

  defs.define_constant('ActiveModel::Railtie::Configuration') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/active_model.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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

  defs.define_constant('ActionMailer::Railtie::Configuration') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_mailer.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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

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

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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

  defs.define_constant('ActionDispatch::Railtie::Configuration') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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

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

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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

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

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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

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

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/sprockets.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046

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

  defs.define_constant('ActionView::Railtie::Configuration') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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

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

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/active_support.rb on lines 4230..4271
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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

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

    klass.define_method('eager_load_namespaces')

Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 9 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2546..2587
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2917..2958
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 847..888
lib/ruby-lint/definitions/rails/action_view.rb on lines 4148..4189
lib/ruby-lint/definitions/rails/active_model.rb on lines 763..804
lib/ruby-lint/definitions/rails/active_record.rb on lines 8152..8193
lib/ruby-lint/definitions/rails/rails.rb on lines 1868..1909
lib/ruby-lint/definitions/rails/rails.rb on lines 2005..2046
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1240..1281

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('Rails::Application::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 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

Severity
Category
Status
Source
Language