YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('ActiveRecord::HasManyThroughAssociationPolymorphicSourceError') do |klass|
    klass.inherits(defs.constant_proxy('ActiveRecord::ActiveRecordError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('owner_class_name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/resolv.rb on lines 737..745
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3499..3507
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3516..3524
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3564..3572
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2262..2270
lib/ruby-lint/definitions/rails/active_record.rb on lines 5950..5958
lib/ruby-lint/definitions/rails/active_record.rb on lines 6039..6047
lib/ruby-lint/definitions/rails/active_support.rb on lines 1455..1463
lib/ruby-lint/definitions/rails/arel.rb on lines 2095..2103

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

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

  defs.define_constant('ActionController::BadRequest') do |klass|
    klass.inherits(defs.constant_proxy('ActionController::ActionControllerError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_optional_argument('type')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 7 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/open_uri.rb on lines 60..70
lib/ruby-lint/definitions/gems/test.rb on lines 689..699
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2826..2836
lib/ruby-lint/definitions/rails/action_view.rb on lines 7423..7433
lib/ruby-lint/definitions/rails/active_record.rb on lines 10868..10878
lib/ruby-lint/definitions/rails/active_support.rb on lines 1467..1477
lib/ruby-lint/definitions/rails/active_support.rb on lines 5597..5607

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('each')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/no_method_error.rb on lines 7..18
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3963..3974
lib/ruby-lint/definitions/rails/action_controller.rb on lines 711..722
lib/ruby-lint/definitions/rails/action_controller.rb on lines 953..964
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1941..1952
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2579..2590
lib/ruby-lint/definitions/rails/action_view.rb on lines 7152..7163
lib/ruby-lint/definitions/rails/active_support.rb on lines 5206..5217
lib/ruby-lint/definitions/rails/rails.rb on lines 2342..2353

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

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

  defs.define_constant('ActiveRecord::StatementInvalid') do |klass|
    klass.inherits(defs.constant_proxy('ActiveRecord::ActiveRecordError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('message')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 7 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/open_uri.rb on lines 60..70
lib/ruby-lint/definitions/gems/test.rb on lines 689..699
lib/ruby-lint/definitions/rails/action_controller.rb on lines 23..33
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2826..2836
lib/ruby-lint/definitions/rails/action_view.rb on lines 7423..7433
lib/ruby-lint/definitions/rails/active_support.rb on lines 1467..1477
lib/ruby-lint/definitions/rails/active_support.rb on lines 5597..5607

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

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('Arel::Nodes::JoinSource') do |klass|
    klass.inherits(defs.constant_proxy('Arel::Nodes::Binary', RubyLint.registry))

    klass.define_instance_method('empty?')

Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 5 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/gem.rb on lines 3063..3072
lib/ruby-lint/definitions/core/gem.rb on lines 3076..3085
lib/ruby-lint/definitions/gems/celluloid.rb on lines 624..633
lib/ruby-lint/definitions/gems/celluloid.rb on lines 2003..2012
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2913..2922

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActiveRecord::HasManyThroughAssociationPointlessSourceTypeError') do |klass|
    klass.inherits(defs.constant_proxy('ActiveRecord::ActiveRecordError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('owner_class_name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/resolv.rb on lines 737..745
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3499..3507
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3516..3524
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3564..3572
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2262..2270
lib/ruby-lint/definitions/rails/active_record.rb on lines 5962..5970
lib/ruby-lint/definitions/rails/active_record.rb on lines 6039..6047
lib/ruby-lint/definitions/rails/active_support.rb on lines 1455..1463
lib/ruby-lint/definitions/rails/arel.rb on lines 2095..2103

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActiveRecord::HasOneThroughCantAssociateThroughCollection') do |klass|
    klass.inherits(defs.constant_proxy('ActiveRecord::ActiveRecordError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('owner_class_name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/resolv.rb on lines 737..745
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3499..3507
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3516..3524
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3564..3572
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2262..2270
lib/ruby-lint/definitions/rails/active_record.rb on lines 5950..5958
lib/ruby-lint/definitions/rails/active_record.rb on lines 5962..5970
lib/ruby-lint/definitions/rails/active_support.rb on lines 1455..1463
lib/ruby-lint/definitions/rails/arel.rb on lines 2095..2103

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('each')

Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/no_method_error.rb on lines 7..18
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3963..3974
lib/ruby-lint/definitions/rails/action_controller.rb on lines 711..722
lib/ruby-lint/definitions/rails/action_controller.rb on lines 953..964
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1941..1952
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2579..2590
lib/ruby-lint/definitions/rails/action_view.rb on lines 7152..7163
lib/ruby-lint/definitions/rails/active_support.rb on lines 5206..5217
lib/ruby-lint/definitions/rails/rails.rb on lines 1280..1291

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Mongoid::Errors::Validations') do |klass|
    klass.inherits(defs.constant_proxy('Mongoid::Errors::MongoidError', RubyLint.registry))

    klass.define_instance_method('document')

Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/no_method_error.rb on lines 7..18
lib/ruby-lint/definitions/rails/action_controller.rb on lines 711..722
lib/ruby-lint/definitions/rails/action_controller.rb on lines 953..964
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1941..1952
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2579..2590
lib/ruby-lint/definitions/rails/action_view.rb on lines 7152..7163
lib/ruby-lint/definitions/rails/active_support.rb on lines 5206..5217
lib/ruby-lint/definitions/rails/rails.rb on lines 1280..1291
lib/ruby-lint/definitions/rails/rails.rb on lines 2342..2353

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActionDispatch::Journey::Visitors::Formatter') do |klass|
    klass.inherits(defs.constant_proxy('ActionDispatch::Journey::Visitors::Visitor', RubyLint.registry))

    klass.define_instance_method('consumed')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/no_method_error.rb on lines 7..18
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3963..3974
lib/ruby-lint/definitions/rails/action_controller.rb on lines 711..722
lib/ruby-lint/definitions/rails/action_controller.rb on lines 953..964
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1941..1952
lib/ruby-lint/definitions/rails/action_view.rb on lines 7152..7163
lib/ruby-lint/definitions/rails/active_support.rb on lines 5206..5217
lib/ruby-lint/definitions/rails/rails.rb on lines 1280..1291
lib/ruby-lint/definitions/rails/rails.rb on lines 2342..2353

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('each')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/no_method_error.rb on lines 7..18
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3963..3974
lib/ruby-lint/definitions/rails/action_controller.rb on lines 711..722
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1941..1952
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2579..2590
lib/ruby-lint/definitions/rails/action_view.rb on lines 7152..7163
lib/ruby-lint/definitions/rails/active_support.rb on lines 5206..5217
lib/ruby-lint/definitions/rails/rails.rb on lines 1280..1291
lib/ruby-lint/definitions/rails/rails.rb on lines 2342..2353

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActiveSupport::Deprecation::DeprecatedObjectProxy') do |klass|
    klass.inherits(defs.constant_proxy('ActiveSupport::Deprecation::DeprecationProxy', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('object')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/resolv.rb on lines 737..745
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3499..3507
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3516..3524
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3564..3572
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2262..2270
lib/ruby-lint/definitions/rails/active_record.rb on lines 5950..5958
lib/ruby-lint/definitions/rails/active_record.rb on lines 5962..5970
lib/ruby-lint/definitions/rails/active_record.rb on lines 6039..6047
lib/ruby-lint/definitions/rails/arel.rb on lines 2095..2103

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Nokogiri::HTML::SAX::PushParser') do |klass|
    klass.inherits(defs.constant_proxy('Nokogiri::XML::SAX::PushParser', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_optional_argument('doc')
Severity: Major
Found in lib/ruby-lint/definitions/gems/nokogiri.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/resolv.rb on lines 737..745
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3499..3507
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3516..3524
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3564..3572
lib/ruby-lint/definitions/rails/active_record.rb on lines 5950..5958
lib/ruby-lint/definitions/rails/active_record.rb on lines 5962..5970
lib/ruby-lint/definitions/rails/active_record.rb on lines 6039..6047
lib/ruby-lint/definitions/rails/active_support.rb on lines 1455..1463
lib/ruby-lint/definitions/rails/arel.rb on lines 2095..2103

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

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

  defs.define_constant('ActionView::WrongEncodingError') do |klass|
    klass.inherits(defs.constant_proxy('ActionView::EncodingError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('string')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 7 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/open_uri.rb on lines 60..70
lib/ruby-lint/definitions/gems/test.rb on lines 689..699
lib/ruby-lint/definitions/rails/action_controller.rb on lines 23..33
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2826..2836
lib/ruby-lint/definitions/rails/active_record.rb on lines 10868..10878
lib/ruby-lint/definitions/rails/active_support.rb on lines 1467..1477
lib/ruby-lint/definitions/rails/active_support.rb on lines 5597..5607

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

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

    klass.define_instance_method('dispatch')

Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 5 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/gem.rb on lines 3063..3072
lib/ruby-lint/definitions/core/gem.rb on lines 3076..3085
lib/ruby-lint/definitions/gems/celluloid.rb on lines 624..633
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2913..2922
lib/ruby-lint/definitions/rails/arel.rb on lines 3790..3799

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

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

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

    klass.define_method('new') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 7 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/open_uri.rb on lines 60..70
lib/ruby-lint/definitions/gems/test.rb on lines 689..699
lib/ruby-lint/definitions/rails/action_controller.rb on lines 23..33
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2826..2836
lib/ruby-lint/definitions/rails/action_view.rb on lines 7423..7433
lib/ruby-lint/definitions/rails/active_record.rb on lines 10868..10878
lib/ruby-lint/definitions/rails/active_support.rb on lines 5597..5607

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

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

  defs.define_constant('ActionDispatch::ParamsParser::ParseError') do |klass|
    klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('message')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 7 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/open_uri.rb on lines 60..70
lib/ruby-lint/definitions/gems/test.rb on lines 689..699
lib/ruby-lint/definitions/rails/action_controller.rb on lines 23..33
lib/ruby-lint/definitions/rails/action_view.rb on lines 7423..7433
lib/ruby-lint/definitions/rails/active_record.rb on lines 10868..10878
lib/ruby-lint/definitions/rails/active_support.rb on lines 1467..1477
lib/ruby-lint/definitions/rails/active_support.rb on lines 5597..5607

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

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

    klass.define_instance_method('dependency')

Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 5 other locations - About 35 mins to fix
lib/ruby-lint/definitions/core/gem.rb on lines 3063..3072
lib/ruby-lint/definitions/gems/celluloid.rb on lines 624..633
lib/ruby-lint/definitions/gems/celluloid.rb on lines 2003..2012
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2913..2922
lib/ruby-lint/definitions/rails/arel.rb on lines 3790..3799

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('NoMethodError') do |klass|
    klass.inherits(defs.constant_proxy('NameError', RubyLint.registry))

    klass.define_instance_method('args')

Severity: Major
Found in lib/ruby-lint/definitions/core/no_method_error.rb and 9 other locations - About 35 mins to fix
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3963..3974
lib/ruby-lint/definitions/rails/action_controller.rb on lines 711..722
lib/ruby-lint/definitions/rails/action_controller.rb on lines 953..964
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1941..1952
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2579..2590
lib/ruby-lint/definitions/rails/action_view.rb on lines 7152..7163
lib/ruby-lint/definitions/rails/active_support.rb on lines 5206..5217
lib/ruby-lint/definitions/rails/rails.rb on lines 1280..1291
lib/ruby-lint/definitions/rails/rails.rb on lines 2342..2353

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

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

    klass.define_instance_method('initialize') do |method|
      method.define_argument('number')
Severity: Minor
Found in lib/ruby-lint/definitions/rails/action_view.rb and 2 other locations - About 35 mins to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 1630..1641
lib/ruby-lint/definitions/rails/action_view.rb on lines 6557..6568

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

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