YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

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

    klass.define_instance_method('initialize') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('OpenSSL::Digest::MD4::Digest') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('OpenSSL::Cipher::CAST5::RC5') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('OpenSSL::Cipher::DES') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('OpenSSL::Cipher::AES') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('OpenSSL::Cipher::CAST5::DES') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('OpenSSL::Cipher::CAST5::IDEA') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('OpenSSL::Cipher::CAST5::RC2') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('initialize') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('initialize') do |method|
      method.define_argument('keys')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 59 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/interrupt.rb on lines 7..13
lib/ruby-lint/definitions/core/open_ssl.rb on lines 883..889
lib/ruby-lint/definitions/core/open_ssl.rb on lines 893..899
lib/ruby-lint/definitions/core/open_ssl.rb on lines 903..909
lib/ruby-lint/definitions/core/open_ssl.rb on lines 913..919
lib/ruby-lint/definitions/core/open_ssl.rb on lines 923..929
lib/ruby-lint/definitions/core/open_ssl.rb on lines 933..939
lib/ruby-lint/definitions/core/open_ssl.rb on lines 943..949
lib/ruby-lint/definitions/core/open_ssl.rb on lines 953..959
lib/ruby-lint/definitions/core/open_ssl.rb on lines 963..969
lib/ruby-lint/definitions/core/open_ssl.rb on lines 973..979
lib/ruby-lint/definitions/core/open_ssl.rb on lines 983..989
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1003..1009
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1013..1019
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1023..1029
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1033..1039
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1043..1049
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1063..1069
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1073..1079
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1083..1089
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1093..1099
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1103..1109
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1308..1314
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1395..1401
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3393..3399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3408..3414
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3423..3429
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3533..3539
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3597..3603
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3612..3618
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3764..3770
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3779..3785
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3794..3800
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3868..3874
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 370..376
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1700..1706
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2926..2932
lib/ruby-lint/definitions/rails/action_view.rb on lines 495..501
lib/ruby-lint/definitions/rails/action_view.rb on lines 2301..2307
lib/ruby-lint/definitions/rails/action_view.rb on lines 3883..3889
lib/ruby-lint/definitions/rails/action_view.rb on lines 5243..5249
lib/ruby-lint/definitions/rails/active_record.rb on lines 5522..5528
lib/ruby-lint/definitions/rails/active_record.rb on lines 5590..5596
lib/ruby-lint/definitions/rails/active_record.rb on lines 5600..5606
lib/ruby-lint/definitions/rails/active_record.rb on lines 5806..5812
lib/ruby-lint/definitions/rails/active_record.rb on lines 5929..5935
lib/ruby-lint/definitions/rails/active_record.rb on lines 6029..6035
lib/ruby-lint/definitions/rails/active_record.rb on lines 6051..6057
lib/ruby-lint/definitions/rails/active_record.rb on lines 8229..8235
lib/ruby-lint/definitions/rails/active_record.rb on lines 11643..11649
lib/ruby-lint/definitions/rails/active_support.rb on lines 5615..5621
lib/ruby-lint/definitions/rails/arel.rb on lines 2948..2954
lib/ruby-lint/definitions/rails/arel.rb on lines 5111..5117
lib/ruby-lint/definitions/rails/arel.rb on lines 5175..5181
lib/ruby-lint/definitions/rails/arel.rb on lines 5239..5245
lib/ruby-lint/definitions/rails/arel.rb on lines 7025..7031
lib/ruby-lint/definitions/rails/arel.rb on lines 7268..7274
lib/ruby-lint/definitions/rails/arel.rb on lines 7875..7881

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActiveRecord::Base::AbsenceValidator') do |klass|
    klass.inherits(defs.constant_proxy('ActiveModel::EachValidator', RubyLint.registry))

    klass.define_instance_method('validate_each') do |method|
      method.define_argument('record')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActiveRecord::SchemaMigration::AssociatedValidator') do |klass|
    klass.inherits(defs.constant_proxy('ActiveModel::EachValidator', RubyLint.registry))

    klass.define_instance_method('validate_each') do |method|
      method.define_argument('record')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActiveRecord::SchemaMigration::WithValidator') do |klass|
    klass.inherits(defs.constant_proxy('ActiveModel::EachValidator', RubyLint.registry))

    klass.define_instance_method('validate_each') do |method|
      method.define_argument('record')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('method_missing') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('RSpec::Core::Invocations::PrintVersion') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('call') do |method|
      method.define_argument('_options')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('method_missing') do |method|
      method.define_argument('method')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActiveRecord::Base::WithValidator') do |klass|
    klass.inherits(defs.constant_proxy('ActiveModel::EachValidator', RubyLint.registry))

    klass.define_instance_method('validate_each') do |method|
      method.define_argument('record')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('RSpec::Core::Invocations::DRbWithFallback') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('call') do |method|
      method.define_argument('options')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Mongoid::Fields::Validators::Macro') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('validate') do |method|
      method.define_argument('klass')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/action_view.rb on lines 4433..4439
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_instance_method('render_template') do |method|
      method.define_argument('template')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 28 other locations - About 20 mins to fix
lib/ruby-lint/definitions/core/option_parser.rb on lines 1228..1234
lib/ruby-lint/definitions/core/option_parser.rb on lines 1253..1259
lib/ruby-lint/definitions/core/option_parser.rb on lines 1272..1278
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3849..3855
lib/ruby-lint/definitions/gems/gtk.rb on lines 8530..8536
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4717..4723
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5174..5180
lib/ruby-lint/definitions/gems/mongoid.rb on lines 5659..5665
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8823..8829
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8875..8881
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8909..8915
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 700..706
lib/ruby-lint/definitions/gems/rspec.rb on lines 4847..4853
lib/ruby-lint/definitions/gems/rspec.rb on lines 4857..4863
lib/ruby-lint/definitions/gems/rspec.rb on lines 5069..5075
lib/ruby-lint/definitions/rails/active_model.rb on lines 1213..1219
lib/ruby-lint/definitions/rails/active_model.rb on lines 1492..1498
lib/ruby-lint/definitions/rails/active_model.rb on lines 1502..1508
lib/ruby-lint/definitions/rails/active_record.rb on lines 72..78
lib/ruby-lint/definitions/rails/active_record.rb on lines 1578..1584
lib/ruby-lint/definitions/rails/active_record.rb on lines 1641..1647
lib/ruby-lint/definitions/rails/active_record.rb on lines 3115..3121
lib/ruby-lint/definitions/rails/active_record.rb on lines 8675..8681
lib/ruby-lint/definitions/rails/active_record.rb on lines 9223..9229
lib/ruby-lint/definitions/rails/active_record.rb on lines 9286..9292
lib/ruby-lint/definitions/rails/active_record.rb on lines 10765..10771
lib/ruby-lint/definitions/rails/active_record.rb on lines 11715..11721
lib/ruby-lint/definitions/rails/active_support.rb on lines 4152..4158

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language