YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('Rails::Application::Bootstrap::Initializer') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_mailer.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/active_model.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/sprockets.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1077..1106
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

  defs.define_constant('Devise::Engine::Initializer') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('after')

Severity: Major
Found in lib/ruby-lint/definitions/gems/devise.rb and 15 other locations - About 1 hr to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

    klass.define_method('build') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 4 other locations - About 1 hr to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 2144..2174
lib/ruby-lint/definitions/rails/action_view.rb on lines 2226..2256
lib/ruby-lint/definitions/rails/action_view.rb on lines 3919..3949
lib/ruby-lint/definitions/rails/action_view.rb on lines 4324..4354

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

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

    klass.define_instance_method('capture') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 2 other locations - About 1 hr to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 2366..2393
lib/ruby-lint/definitions/rails/action_view.rb on lines 5531..5558

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

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

    klass.define_method('build') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 4 other locations - About 1 hr to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 2226..2256
lib/ruby-lint/definitions/rails/action_view.rb on lines 3710..3740
lib/ruby-lint/definitions/rails/action_view.rb on lines 3919..3949
lib/ruby-lint/definitions/rails/action_view.rb on lines 4324..4354

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

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

    klass.define_instance_method('capture') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 2 other locations - About 1 hr to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 569..596
lib/ruby-lint/definitions/rails/action_view.rb on lines 2366..2393

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

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

    klass.define_method('root')

Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 1 hr to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3658..3688

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

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

    klass.define_method('build') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 4 other locations - About 1 hr to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 2144..2174
lib/ruby-lint/definitions/rails/action_view.rb on lines 2226..2256
lib/ruby-lint/definitions/rails/action_view.rb on lines 3710..3740
lib/ruby-lint/definitions/rails/action_view.rb on lines 4324..4354

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

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

    klass.define_method('build') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 4 other locations - About 1 hr to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 2144..2174
lib/ruby-lint/definitions/rails/action_view.rb on lines 2226..2256
lib/ruby-lint/definitions/rails/action_view.rb on lines 3710..3740
lib/ruby-lint/definitions/rails/action_view.rb on lines 3919..3949

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

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

    klass.define_instance_method('capture') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 2 other locations - About 1 hr to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 569..596
lib/ruby-lint/definitions/rails/action_view.rb on lines 5531..5558

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

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