YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('Arel::Attributes::Boolean::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('CSV::FieldInfo::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/csv.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('ActiveRecord::ConnectionAdapters::IndexDefinition::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Arel::Attributes::Float::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Nokogiri::HTML::EntityDescription::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/gems/nokogiri.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher::AttributeMethodMatch::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_model.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Arel::Attributes::Decimal::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('ActionController::ParamsWrapper::Options::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Sprockets::ProcessedAsset::DependencyFile::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/sprockets.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438

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

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

  defs.define_constant('Arel::Attributes::Undefined::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('ActiveRecord::NullMigration::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('ActiveRecord::ConnectionAdapters::ColumnDefinition::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Nokogiri::XML::Notation::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/gems/nokogiri.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Arel::Attributes::Attribute::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Arel::Attributes::Time::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Arel::SelectManager::Row::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Sinatra::ExtendedRack::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/gems/sinatra.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('IRB::DefaultEncodings::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/irb.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('ActiveRecord::MigrationProxy::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Arel::Attributes::Integer::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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