YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

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

    klass.define_instance_method('_field_changed?') do |method|
      method.define_argument('attr')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 1 other location - About 1 hr to fix
lib/ruby-lint/definitions/rails/active_record.rb on lines 9557..9578

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

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('Resolv::DNS::Resource::HINFO::Generic') do |klass|
    klass.inherits(defs.constant_proxy('Resolv::DNS::Resource', RubyLint.registry))

    klass.define_method('create') do |method|
      method.define_argument('type_value')
Severity: Major
Found in lib/ruby-lint/definitions/core/resolv.rb and 1 other location - About 1 hr to fix
lib/ruby-lint/definitions/core/resolv.rb on lines 870..891

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

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

    klass.define_instance_method('[]') do |method|
      method.define_argument('key')
Severity: Major
Found in lib/ruby-lint/definitions/gems/sinatra.rb and 1 other location - About 1 hr to fix
lib/ruby-lint/definitions/gems/sinatra.rb on lines 200..222

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

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

    klass.define_instance_method('count')
Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 5 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/gem.rb on lines 565..583
lib/ruby-lint/definitions/core/gem.rb on lines 1802..1820
lib/ruby-lint/definitions/core/gem.rb on lines 1852..1870
lib/ruby-lint/definitions/core/gem.rb on lines 2923..2941
lib/ruby-lint/definitions/core/gem.rb on lines 2973..2991

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

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

    klass.define_instance_method('count')
Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 5 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/gem.rb on lines 515..533
lib/ruby-lint/definitions/core/gem.rb on lines 565..583
lib/ruby-lint/definitions/core/gem.rb on lines 1852..1870
lib/ruby-lint/definitions/core/gem.rb on lines 2923..2941
lib/ruby-lint/definitions/core/gem.rb on lines 2973..2991

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

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

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/zlib.rb and 2 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/open_ssl.rb on lines 3922..3953
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 7337..7368

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

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

    klass.define_instance_method('count')
Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 5 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/gem.rb on lines 515..533
lib/ruby-lint/definitions/core/gem.rb on lines 565..583
lib/ruby-lint/definitions/core/gem.rb on lines 1802..1820
lib/ruby-lint/definitions/core/gem.rb on lines 2923..2941
lib/ruby-lint/definitions/core/gem.rb on lines 2973..2991

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

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

    klass.define_instance_method('code')

Severity: Major
Found in lib/ruby-lint/definitions/gems/nokogiri.rb and 2 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/open_ssl.rb on lines 3922..3953
lib/ruby-lint/definitions/core/zlib.rb on lines 310..341

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

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

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 2 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/zlib.rb on lines 310..341
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 7337..7368

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

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

    klass.define_instance_method('count')
Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 5 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/gem.rb on lines 515..533
lib/ruby-lint/definitions/core/gem.rb on lines 565..583
lib/ruby-lint/definitions/core/gem.rb on lines 1802..1820
lib/ruby-lint/definitions/core/gem.rb on lines 1852..1870
lib/ruby-lint/definitions/core/gem.rb on lines 2923..2941

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

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

    klass.define_instance_method('count')
Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 5 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/gem.rb on lines 515..533
lib/ruby-lint/definitions/core/gem.rb on lines 1802..1820
lib/ruby-lint/definitions/core/gem.rb on lines 1852..1870
lib/ruby-lint/definitions/core/gem.rb on lines 2923..2941
lib/ruby-lint/definitions/core/gem.rb on lines 2973..2991

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

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

    klass.define_instance_method('count')
Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 5 other locations - About 1 hr to fix
lib/ruby-lint/definitions/core/gem.rb on lines 515..533
lib/ruby-lint/definitions/core/gem.rb on lines 565..583
lib/ruby-lint/definitions/core/gem.rb on lines 1802..1820
lib/ruby-lint/definitions/core/gem.rb on lines 1852..1870
lib/ruby-lint/definitions/core/gem.rb on lines 2973..2991

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

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('Resolv::DNS::Requester::ConnectedUDP::UnconnectedUDP') do |klass|
    klass.inherits(defs.constant_proxy('Resolv::DNS::Requester', RubyLint.registry))

    klass.define_instance_method('close')

Severity: Major
Found in lib/ruby-lint/definitions/core/resolv.rb and 1 other location - About 1 hr to fix
lib/ruby-lint/definitions/core/resolv.rb on lines 773..792

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

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::Supervisor') 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 3145..3164

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

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::Supervisor') 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 4262..4281

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

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('Resolv::DNS::Requester::UnconnectedUDP') do |klass|
    klass.inherits(defs.constant_proxy('Resolv::DNS::Requester', RubyLint.registry))

    klass.define_instance_method('close')

Severity: Major
Found in lib/ruby-lint/definitions/core/resolv.rb and 1 other location - About 1 hr to fix
lib/ruby-lint/definitions/core/resolv.rb on lines 709..728

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

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

    klass.define_instance_method('append') do |method|
      method.define_rest_argument('callbacks')
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/rails/action_controller.rb on lines 589..610
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3191..3212
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 281..302
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3138..3159
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 514..535
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1056..1077
lib/ruby-lint/definitions/rails/action_view.rb on lines 5506..5527
lib/ruby-lint/definitions/rails/action_view.rb on lines 7030..7051
lib/ruby-lint/definitions/rails/active_model.rb on lines 1059..1080
lib/ruby-lint/definitions/rails/active_record.rb on lines 2054..2075
lib/ruby-lint/definitions/rails/active_record.rb on lines 3546..3567
lib/ruby-lint/definitions/rails/active_record.rb on lines 9699..9720
lib/ruby-lint/definitions/rails/active_record.rb on lines 11406..11427
lib/ruby-lint/definitions/rails/rails.rb on lines 1158..1179
lib/ruby-lint/definitions/rails/rails.rb on lines 2220..2241

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

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

    klass.define_instance_method('append') do |method|
      method.define_rest_argument('callbacks')
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/rails/action_controller.rb on lines 589..610
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3191..3212
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 281..302
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3138..3159
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 514..535
lib/ruby-lint/definitions/rails/action_view.rb on lines 5506..5527
lib/ruby-lint/definitions/rails/action_view.rb on lines 7030..7051
lib/ruby-lint/definitions/rails/active_model.rb on lines 1059..1080
lib/ruby-lint/definitions/rails/active_record.rb on lines 2054..2075
lib/ruby-lint/definitions/rails/active_record.rb on lines 3546..3567
lib/ruby-lint/definitions/rails/active_record.rb on lines 9699..9720
lib/ruby-lint/definitions/rails/active_record.rb on lines 11406..11427
lib/ruby-lint/definitions/rails/active_support.rb on lines 4968..4989
lib/ruby-lint/definitions/rails/rails.rb on lines 1158..1179
lib/ruby-lint/definitions/rails/rails.rb on lines 2220..2241

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

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::TestCase::TestController::CallbackChain') do |klass|
    klass.inherits(defs.constant_proxy('Array', RubyLint.registry))

    klass.define_instance_method('append') do |method|
      method.define_rest_argument('callbacks')
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/rails/action_controller.rb on lines 589..610
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3191..3212
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 281..302
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3138..3159
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 514..535
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1056..1077
lib/ruby-lint/definitions/rails/action_view.rb on lines 5506..5527
lib/ruby-lint/definitions/rails/active_model.rb on lines 1059..1080
lib/ruby-lint/definitions/rails/active_record.rb on lines 2054..2075
lib/ruby-lint/definitions/rails/active_record.rb on lines 3546..3567
lib/ruby-lint/definitions/rails/active_record.rb on lines 9699..9720
lib/ruby-lint/definitions/rails/active_record.rb on lines 11406..11427
lib/ruby-lint/definitions/rails/active_support.rb on lines 4968..4989
lib/ruby-lint/definitions/rails/rails.rb on lines 1158..1179
lib/ruby-lint/definitions/rails/rails.rb on lines 2220..2241

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

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

    klass.define_instance_method('append') do |method|
      method.define_rest_argument('callbacks')
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/rails/action_controller.rb on lines 589..610
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3191..3212
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 281..302
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3138..3159
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 514..535
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1056..1077
lib/ruby-lint/definitions/rails/action_view.rb on lines 5506..5527
lib/ruby-lint/definitions/rails/action_view.rb on lines 7030..7051
lib/ruby-lint/definitions/rails/active_record.rb on lines 2054..2075
lib/ruby-lint/definitions/rails/active_record.rb on lines 3546..3567
lib/ruby-lint/definitions/rails/active_record.rb on lines 9699..9720
lib/ruby-lint/definitions/rails/active_record.rb on lines 11406..11427
lib/ruby-lint/definitions/rails/active_support.rb on lines 4968..4989
lib/ruby-lint/definitions/rails/rails.rb on lines 1158..1179
lib/ruby-lint/definitions/rails/rails.rb on lines 2220..2241

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

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