YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('ActionDispatch::Cookies::UpgradeLegacyEncryptedCookieJar') do |klass|
    klass.inherits(defs.constant_proxy('ActionDispatch::Cookies::EncryptedCookieJar', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActionDispatch::Cookies::VerifyAndUpgradeLegacySignedMessage', RubyLint.registry))

    klass.define_instance_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 6 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 314..319
lib/ruby-lint/definitions/gems/glib.rb on lines 1225..1230
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 650..655
lib/ruby-lint/definitions/rails/active_record.rb on lines 645..650
lib/ruby-lint/definitions/rails/active_record.rb on lines 2528..2533
lib/ruby-lint/definitions/rails/active_record.rb on lines 10178..10183

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

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

  defs.define_constant('ActionDispatch::Cookies::UpgradeLegacySignedCookieJar') do |klass|
    klass.inherits(defs.constant_proxy('ActionDispatch::Cookies::SignedCookieJar', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActionDispatch::Cookies::VerifyAndUpgradeLegacySignedMessage', RubyLint.registry))

    klass.define_instance_method('[]') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 6 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 314..319
lib/ruby-lint/definitions/gems/glib.rb on lines 1225..1230
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 641..646
lib/ruby-lint/definitions/rails/active_record.rb on lines 645..650
lib/ruby-lint/definitions/rails/active_record.rb on lines 2528..2533
lib/ruby-lint/definitions/rails/active_record.rb on lines 10178..10183

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

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

  defs.define_constant('ActiveRecord::SchemaMigration::HasOneThroughAssociation') do |klass|
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::HasOneAssociation', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::ThroughAssociation', RubyLint.registry))

    klass.define_instance_method('replace') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 6 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 314..319
lib/ruby-lint/definitions/gems/glib.rb on lines 1225..1230
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 641..646
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 650..655
lib/ruby-lint/definitions/rails/active_record.rb on lines 645..650
lib/ruby-lint/definitions/rails/active_record.rb on lines 2528..2533

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

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

  defs.define_constant('GLib::IOChannelError') do |klass|
    klass.inherits(defs.constant_proxy('IOError', RubyLint.registry))
    klass.inherits(defs.constant_proxy('GLib::ErrorInfo', RubyLint.registry))

    klass.define_method('from_errno') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/glib.rb and 6 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 314..319
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 641..646
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 650..655
lib/ruby-lint/definitions/rails/active_record.rb on lines 645..650
lib/ruby-lint/definitions/rails/active_record.rb on lines 2528..2533
lib/ruby-lint/definitions/rails/active_record.rb on lines 10178..10183

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_method('add_renderer') do |method|
      method.define_argument('key')
Severity: Minor
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 4 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/rb_config.rb on lines 7..15
lib/ruby-lint/definitions/gems/rspec.rb on lines 899..907
lib/ruby-lint/definitions/gems/rspec.rb on lines 4208..4216
lib/ruby-lint/definitions/rails/active_support.rb on lines 132..140

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

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

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

    klass.define_instance_method('match') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/core/option_parser.rb and 6 other locations - About 20 mins to fix
lib/ruby-lint/definitions/gems/glib.rb on lines 1225..1230
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 641..646
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 650..655
lib/ruby-lint/definitions/rails/active_record.rb on lines 645..650
lib/ruby-lint/definitions/rails/active_record.rb on lines 2528..2533
lib/ruby-lint/definitions/rails/active_record.rb on lines 10178..10183

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

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

  defs.define_constant('ActiveRecord::Associations::HasOneThroughAssociation') do |klass|
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::HasOneAssociation', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::ThroughAssociation', RubyLint.registry))

    klass.define_instance_method('replace') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 6 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 314..319
lib/ruby-lint/definitions/gems/glib.rb on lines 1225..1230
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 641..646
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 650..655
lib/ruby-lint/definitions/rails/active_record.rb on lines 2528..2533
lib/ruby-lint/definitions/rails/active_record.rb on lines 10178..10183

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

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

  defs.define_constant('ActiveRecord::Base::HasOneThroughAssociation') do |klass|
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::HasOneAssociation', RubyLint.registry))
    klass.inherits(defs.constant_proxy('ActiveRecord::Associations::ThroughAssociation', RubyLint.registry))

    klass.define_instance_method('replace') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 6 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 314..319
lib/ruby-lint/definitions/gems/glib.rb on lines 1225..1230
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 641..646
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 650..655
lib/ruby-lint/definitions/rails/active_record.rb on lines 645..650
lib/ruby-lint/definitions/rails/active_record.rb on lines 10178..10183

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

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('RSpec::Core::Configuration::AroundHook') do |klass|
    klass.inherits(defs.constant_proxy('RSpec::Core::Hooks::Hook', RubyLint.registry))

    klass.define_instance_method('execute_with') do |method|
      method.define_argument('example')
Severity: Minor
Found in lib/ruby-lint/definitions/gems/rspec.rb and 4 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/rb_config.rb on lines 7..15
lib/ruby-lint/definitions/gems/rspec.rb on lines 4208..4216
lib/ruby-lint/definitions/rails/action_controller.rb on lines 7..15
lib/ruby-lint/definitions/rails/active_support.rb on lines 132..140

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

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('RSpec::Core::Hooks::AroundHook') do |klass|
    klass.inherits(defs.constant_proxy('RSpec::Core::Hooks::Hook', RubyLint.registry))

    klass.define_instance_method('execute_with') do |method|
      method.define_argument('example')
Severity: Minor
Found in lib/ruby-lint/definitions/gems/rspec.rb and 4 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/rb_config.rb on lines 7..15
lib/ruby-lint/definitions/gems/rspec.rb on lines 899..907
lib/ruby-lint/definitions/rails/action_controller.rb on lines 7..15
lib/ruby-lint/definitions/rails/active_support.rb on lines 132..140

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

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

    klass.define_method('expand') do |method|
      method.define_argument('val')
Severity: Minor
Found in lib/ruby-lint/definitions/core/rb_config.rb and 4 other locations - About 20 mins to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 899..907
lib/ruby-lint/definitions/gems/rspec.rb on lines 4208..4216
lib/ruby-lint/definitions/rails/action_controller.rb on lines 7..15
lib/ruby-lint/definitions/rails/active_support.rb on lines 132..140

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

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

    klass.define_instance_method('id')

Severity: Minor
Found in lib/ruby-lint/definitions/rails/arel.rb and 1 other location - About 20 mins to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1027..1034

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

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

    klass.define_instance_method('env_name')

Severity: Minor
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 1 other location - About 20 mins to fix
lib/ruby-lint/definitions/rails/arel.rb on lines 6871..6878

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

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

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

    klass.define_instance_method('each') do |method|
      method.define_block_argument('block')
Severity: Minor
Found in lib/ruby-lint/definitions/core/prime.rb and 5 other locations - About 20 mins to fix
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1288..1297
lib/ruby-lint/definitions/gems/test.rb on lines 2473..2482
lib/ruby-lint/definitions/gems/test.rb on lines 2485..2494
lib/ruby-lint/definitions/gems/test.rb on lines 2497..2506
lib/ruby-lint/definitions/rails/active_record.rb on lines 235..244

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

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

    klass.define_instance_method('config')

Severity: Minor
Found in lib/ruby-lint/definitions/rails/active_support.rb and 4 other locations - About 20 mins to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5463..5472
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 81..90
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1678..1687
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1757..1766

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

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

    klass.define_instance_method('atomically')

Severity: Minor
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 4 other locations - About 20 mins to fix
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 81..90
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1678..1687
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1757..1766
lib/ruby-lint/definitions/rails/active_support.rb on lines 864..873

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

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

  defs.define_constant('Test::Unit::TestResultOmissionSupport') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('add_omission') do |method|
      method.define_argument('omission')
Severity: Minor
Found in lib/ruby-lint/definitions/gems/test.rb and 5 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/prime.rb on lines 250..259
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1288..1297
lib/ruby-lint/definitions/gems/test.rb on lines 2473..2482
lib/ruby-lint/definitions/gems/test.rb on lines 2497..2506
lib/ruby-lint/definitions/rails/active_record.rb on lines 235..244

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

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

  defs.define_constant('Test::Unit::TestResultNotificationSupport') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('add_notification') do |method|
      method.define_argument('notification')
Severity: Minor
Found in lib/ruby-lint/definitions/gems/test.rb and 5 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/prime.rb on lines 250..259
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1288..1297
lib/ruby-lint/definitions/gems/test.rb on lines 2485..2494
lib/ruby-lint/definitions/gems/test.rb on lines 2497..2506
lib/ruby-lint/definitions/rails/active_record.rb on lines 235..244

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('config')

Severity: Minor
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 4 other locations - About 20 mins to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5463..5472
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 81..90
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1678..1687
lib/ruby-lint/definitions/rails/active_support.rb on lines 864..873

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

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

    klass.define_instance_method('config')

Severity: Minor
Found in lib/ruby-lint/definitions/rails/abstract_controller.rb and 4 other locations - About 20 mins to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5463..5472
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1678..1687
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1757..1766
lib/ruby-lint/definitions/rails/active_support.rb on lines 864..873

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

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