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

    klass.define_instance_method('initialize') do |method|
      method.define_optional_argument('pattern')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.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 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 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('Arel::Nodes::Rows') do |klass|
    klass.inherits(defs.constant_proxy('Arel::Nodes::Unary', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_optional_argument('expr')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.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 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 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::ReadonlyDocument') do |klass|
    klass.inherits(defs.constant_proxy('Mongoid::Errors::MongoidError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('klass')
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 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/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::AES192') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('mode')
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 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::BF') 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 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::AES256') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('mode')
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 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::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 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 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('Arel::Sql::Engine') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('new') do |method|
      method.define_argument('thing')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.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 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 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('ActiveRecord::DeleteRestrictionError') do |klass|
    klass.inherits(defs.constant_proxy('ActiveRecord::ActiveRecordError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.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 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 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::InvalidStorageParent') do |klass|
    klass.inherits(defs.constant_proxy('Mongoid::Errors::MongoidError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('klass')
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 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::NoParent') do |klass|
    klass.inherits(defs.constant_proxy('Mongoid::Errors::MongoidError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('klass')
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 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 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::RC4') 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 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::RC4') 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 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 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::NoMetadata') do |klass|
    klass.inherits(defs.constant_proxy('Mongoid::Errors::MongoidError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('klass')
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 3723..3729
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3749..3755
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::NoSessionConfig') 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 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 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('Interrupt') do |klass|
    klass.inherits(defs.constant_proxy('SignalException', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/interrupt.rb and 59 other locations - About 20 mins to fix
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 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::AES256') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('mode')
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 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::BF') 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 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('Mongoid::Errors::InvalidTime') do |klass|
    klass.inherits(defs.constant_proxy('Mongoid::Errors::MongoidError', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('value')
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 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::AES128') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Cipher', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('mode')
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 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

Severity
Category
Status
Source
Language