YorickPeterse/ruby-lint

View on GitHub
lib/ruby-lint/definitions/gems/devise.rb

Summary

Maintainability
F
6 days
Test Coverage

File devise.rb has 1542 lines of code (exceeds 250 allowed). Consider refactoring.
Open

RubyLint.registry.register('Devise') do |defs|
  defs.define_constant('Devise') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('add_mapping') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/devise.rb - About 4 days to fix

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

      defs.define_constant('Devise::Engine::Railties') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
        klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
    
        klass.define_method('engines')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 2 other locations - About 2 hrs to fix
    lib/ruby-lint/definitions/rails/rails.rb on lines 523..555
    lib/ruby-lint/definitions/rails/rails.rb on lines 916..948

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::Engine::Initializer') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('after')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 15 other locations - About 1 hr to fix
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2590..2619
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2961..2990
    lib/ruby-lint/definitions/rails/action_mailer.rb on lines 891..920
    lib/ruby-lint/definitions/rails/action_view.rb on lines 4192..4221
    lib/ruby-lint/definitions/rails/active_model.rb on lines 807..836
    lib/ruby-lint/definitions/rails/active_record.rb on lines 8196..8225
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4274..4303
    lib/ruby-lint/definitions/rails/rails.rb on lines 192..221
    lib/ruby-lint/definitions/rails/rails.rb on lines 457..486
    lib/ruby-lint/definitions/rails/rails.rb on lines 490..519
    lib/ruby-lint/definitions/rails/rails.rb on lines 883..912
    lib/ruby-lint/definitions/rails/rails.rb on lines 1433..1462
    lib/ruby-lint/definitions/rails/rails.rb on lines 1912..1941
    lib/ruby-lint/definitions/rails/rails.rb on lines 2049..2078
    lib/ruby-lint/definitions/rails/sprockets.rb on lines 1284..1313

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::Engine::Configuration') do |klass|
        klass.inherits(defs.constant_proxy('Rails::Railtie::Configuration', RubyLint.registry))
    
        klass.define_instance_method('autoload_once_paths')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 1 other location - About 1 hr to fix
    lib/ruby-lint/definitions/rails/rails.rb on lines 847..879

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::Engine::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('config') do |method|
          method.define_rest_argument('args')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 9 other locations - About 1 hr to fix
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2497..2521
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2868..2892
    lib/ruby-lint/definitions/rails/action_mailer.rb on lines 798..822
    lib/ruby-lint/definitions/rails/action_view.rb on lines 4099..4123
    lib/ruby-lint/definitions/rails/active_model.rb on lines 714..738
    lib/ruby-lint/definitions/rails/active_record.rb on lines 8103..8127
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4181..4205
    lib/ruby-lint/definitions/rails/rails.rb on lines 1956..1980
    lib/ruby-lint/definitions/rails/sprockets.rb on lines 1191..1215

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

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

      defs.define_constant('Devise::Controllers::SignInOut') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('sign_in') do |method|
          method.define_argument('resource_or_scope')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 4 other locations - About 1 hr to fix
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 2647..2664
    lib/ruby-lint/definitions/rails/action_view.rb on lines 1793..1810
    lib/ruby-lint/definitions/rails/action_view.rb on lines 6804..6821
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11725..11742

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::OmniAuth::UrlHelpers') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('define_helpers') do |method|
          method.define_argument('mapping')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/devise.rb and 1 other location - About 55 mins to fix
    lib/ruby-lint/definitions/core/exception_for_matrix.rb on lines 7..21

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

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

      defs.define_constant('Devise::Engine::Collection') do |klass|
        klass.inherits(defs.constant_proxy('Array', RubyLint.registry))
        klass.inherits(defs.constant_proxy('TSort', RubyLint.registry))
    
        klass.define_instance_method('+') do |method|
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 14 other locations - About 50 mins to fix
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2525..2538
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2896..2909
    lib/ruby-lint/definitions/rails/action_mailer.rb on lines 826..839
    lib/ruby-lint/definitions/rails/action_view.rb on lines 4127..4140
    lib/ruby-lint/definitions/rails/active_model.rb on lines 742..755
    lib/ruby-lint/definitions/rails/active_record.rb on lines 8131..8144
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4209..4222
    lib/ruby-lint/definitions/rails/rails.rb on lines 176..189
    lib/ruby-lint/definitions/rails/rails.rb on lines 243..256
    lib/ruby-lint/definitions/rails/rails.rb on lines 441..454
    lib/ruby-lint/definitions/rails/rails.rb on lines 826..839
    lib/ruby-lint/definitions/rails/rails.rb on lines 1852..1865
    lib/ruby-lint/definitions/rails/rails.rb on lines 1984..1997
    lib/ruby-lint/definitions/rails/sprockets.rb on lines 1219..1232

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::Models::Validatable') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('assert_validations_api!') do |method|
          method.define_argument('base')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/devise.rb and 1 other location - About 50 mins to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4812..4829

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::Strategies::Authenticatable') do |klass|
        klass.inherits(defs.constant_proxy('Devise::Strategies::Base', RubyLint.registry))
    
        klass.define_instance_method('authentication_hash')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 5 other locations - About 40 mins to fix
    lib/ruby-lint/definitions/core/open_ssl.rb on lines 1909..1926
    lib/ruby-lint/definitions/core/syck.rb on lines 202..219
    lib/ruby-lint/definitions/core/zlib.rb on lines 7..24
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 6052..6069
    lib/ruby-lint/definitions/gems/rspec.rb on lines 9726..9743

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::ParameterSanitizer') do |klass|
        klass.inherits(defs.constant_proxy('Devise::BaseSanitizer', RubyLint.registry))
    
        klass.define_instance_method('account_update')
    
    
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/devise.rb and 2 other locations - About 40 mins to fix
    lib/ruby-lint/definitions/core/erb.rb on lines 143..156
    lib/ruby-lint/definitions/core/gem.rb on lines 1386..1399

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

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

      defs.define_constant('Devise::Controllers::StoreLocation') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('store_location_for') do |method|
          method.define_argument('resource_or_scope')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 11 other locations - About 30 mins to fix
    lib/ruby-lint/definitions/core/open_uri.rb on lines 143..152
    lib/ruby-lint/definitions/gems/rspec.rb on lines 157..166
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1892..1901
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5157..5166
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 225..234
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 1081..1090
    lib/ruby-lint/definitions/gems/test.rb on lines 1159..1168
    lib/ruby-lint/definitions/gems/test.rb on lines 2194..2203
    lib/ruby-lint/definitions/rails/active_model.rb on lines 872..881
    lib/ruby-lint/definitions/rails/active_support.rb on lines 143..152
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5116..5125

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

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

      defs.define_constant('Devise::Models::Timeoutable') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('required_fields') do |method|
          method.define_argument('klass')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/devise.rb and 3 other locations - About 30 mins to fix
    lib/ruby-lint/definitions/gems/glib.rb on lines 1435..1446
    lib/ruby-lint/definitions/gems/gtk.rb on lines 22355..22366
    lib/ruby-lint/definitions/gems/test.rb on lines 784..795

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

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

      defs.define_constant('Devise::Strategies::Authenticatable::NULL_STORE') do |klass|
        klass.inherits(defs.constant_proxy('Rack::Session::Abstract::SessionHash', RubyLint.registry))
    
        klass.define_instance_method('exists?')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 34 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/gem.rb on lines 1282..1290
    lib/ruby-lint/definitions/core/webrick.rb on lines 2190..2198
    lib/ruby-lint/definitions/core/webrick.rb on lines 2222..2230
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 176..184
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1683..1691
    lib/ruby-lint/definitions/gems/devise.rb on lines 1145..1153
    lib/ruby-lint/definitions/gems/devise.rb on lines 2144..2152
    lib/ruby-lint/definitions/gems/devise.rb on lines 2162..2170
    lib/ruby-lint/definitions/gems/devise.rb on lines 2182..2190
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 882..890
    lib/ruby-lint/definitions/gems/rspec.rb on lines 200..208
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1935..1943
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3051..3059
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7840..7848
    lib/ruby-lint/definitions/gems/test.rb on lines 767..775
    lib/ruby-lint/definitions/gems/test.rb on lines 2381..2389
    lib/ruby-lint/definitions/gems/test.rb on lines 2585..2593
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3769..3777
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3797..3805
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7031..7039
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1680..1688
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2327..2335
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2742..2750
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2770..2778
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4554..4562
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4582..4590
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4610..4618
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4638..4646
    lib/ruby-lint/definitions/rails/arel.rb on lines 2055..2063
    lib/ruby-lint/definitions/rails/arel.rb on lines 2083..2091
    lib/ruby-lint/definitions/rails/arel.rb on lines 5522..5530
    lib/ruby-lint/definitions/rails/arel.rb on lines 5550..5558
    lib/ruby-lint/definitions/rails/arel.rb on lines 7040..7048
    lib/ruby-lint/definitions/rails/arel.rb on lines 7068..7076

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

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

      defs.define_constant('Devise::Strategies::Rememberable::NULL_STORE') do |klass|
        klass.inherits(defs.constant_proxy('Rack::Session::Abstract::SessionHash', RubyLint.registry))
    
        klass.define_instance_method('exists?')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 34 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/gem.rb on lines 1282..1290
    lib/ruby-lint/definitions/core/webrick.rb on lines 2190..2198
    lib/ruby-lint/definitions/core/webrick.rb on lines 2222..2230
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 176..184
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1683..1691
    lib/ruby-lint/definitions/gems/devise.rb on lines 1145..1153
    lib/ruby-lint/definitions/gems/devise.rb on lines 2124..2132
    lib/ruby-lint/definitions/gems/devise.rb on lines 2144..2152
    lib/ruby-lint/definitions/gems/devise.rb on lines 2162..2170
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 882..890
    lib/ruby-lint/definitions/gems/rspec.rb on lines 200..208
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1935..1943
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3051..3059
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7840..7848
    lib/ruby-lint/definitions/gems/test.rb on lines 767..775
    lib/ruby-lint/definitions/gems/test.rb on lines 2381..2389
    lib/ruby-lint/definitions/gems/test.rb on lines 2585..2593
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3769..3777
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3797..3805
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7031..7039
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1680..1688
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2327..2335
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2742..2750
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2770..2778
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4554..4562
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4582..4590
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4610..4618
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4638..4646
    lib/ruby-lint/definitions/rails/arel.rb on lines 2055..2063
    lib/ruby-lint/definitions/rails/arel.rb on lines 2083..2091
    lib/ruby-lint/definitions/rails/arel.rb on lines 5522..5530
    lib/ruby-lint/definitions/rails/arel.rb on lines 5550..5558
    lib/ruby-lint/definitions/rails/arel.rb on lines 7040..7048
    lib/ruby-lint/definitions/rails/arel.rb on lines 7068..7076

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

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

      defs.define_constant('Devise::Getter') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('get')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 34 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/gem.rb on lines 1282..1290
    lib/ruby-lint/definitions/core/webrick.rb on lines 2190..2198
    lib/ruby-lint/definitions/core/webrick.rb on lines 2222..2230
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 176..184
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1683..1691
    lib/ruby-lint/definitions/gems/devise.rb on lines 2124..2132
    lib/ruby-lint/definitions/gems/devise.rb on lines 2144..2152
    lib/ruby-lint/definitions/gems/devise.rb on lines 2162..2170
    lib/ruby-lint/definitions/gems/devise.rb on lines 2182..2190
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 882..890
    lib/ruby-lint/definitions/gems/rspec.rb on lines 200..208
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1935..1943
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3051..3059
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7840..7848
    lib/ruby-lint/definitions/gems/test.rb on lines 767..775
    lib/ruby-lint/definitions/gems/test.rb on lines 2381..2389
    lib/ruby-lint/definitions/gems/test.rb on lines 2585..2593
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3769..3777
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3797..3805
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7031..7039
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1680..1688
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2327..2335
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2742..2750
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2770..2778
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4554..4562
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4582..4590
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4610..4618
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4638..4646
    lib/ruby-lint/definitions/rails/arel.rb on lines 2055..2063
    lib/ruby-lint/definitions/rails/arel.rb on lines 2083..2091
    lib/ruby-lint/definitions/rails/arel.rb on lines 5522..5530
    lib/ruby-lint/definitions/rails/arel.rb on lines 5550..5558
    lib/ruby-lint/definitions/rails/arel.rb on lines 7040..7048
    lib/ruby-lint/definitions/rails/arel.rb on lines 7068..7076

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

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

      defs.define_constant('Devise::Strategies::DatabaseAuthenticatable::NULL_STORE') do |klass|
        klass.inherits(defs.constant_proxy('Rack::Session::Abstract::SessionHash', RubyLint.registry))
    
        klass.define_instance_method('exists?')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 34 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/gem.rb on lines 1282..1290
    lib/ruby-lint/definitions/core/webrick.rb on lines 2190..2198
    lib/ruby-lint/definitions/core/webrick.rb on lines 2222..2230
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 176..184
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1683..1691
    lib/ruby-lint/definitions/gems/devise.rb on lines 1145..1153
    lib/ruby-lint/definitions/gems/devise.rb on lines 2124..2132
    lib/ruby-lint/definitions/gems/devise.rb on lines 2144..2152
    lib/ruby-lint/definitions/gems/devise.rb on lines 2182..2190
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 882..890
    lib/ruby-lint/definitions/gems/rspec.rb on lines 200..208
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1935..1943
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3051..3059
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7840..7848
    lib/ruby-lint/definitions/gems/test.rb on lines 767..775
    lib/ruby-lint/definitions/gems/test.rb on lines 2381..2389
    lib/ruby-lint/definitions/gems/test.rb on lines 2585..2593
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3769..3777
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3797..3805
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7031..7039
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1680..1688
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2327..2335
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2742..2750
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2770..2778
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4554..4562
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4582..4590
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4610..4618
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4638..4646
    lib/ruby-lint/definitions/rails/arel.rb on lines 2055..2063
    lib/ruby-lint/definitions/rails/arel.rb on lines 2083..2091
    lib/ruby-lint/definitions/rails/arel.rb on lines 5522..5530
    lib/ruby-lint/definitions/rails/arel.rb on lines 5550..5558
    lib/ruby-lint/definitions/rails/arel.rb on lines 7040..7048
    lib/ruby-lint/definitions/rails/arel.rb on lines 7068..7076

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

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

      defs.define_constant('Devise::Strategies::Base::NULL_STORE') do |klass|
        klass.inherits(defs.constant_proxy('Rack::Session::Abstract::SessionHash', RubyLint.registry))
    
        klass.define_instance_method('exists?')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 34 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/gem.rb on lines 1282..1290
    lib/ruby-lint/definitions/core/webrick.rb on lines 2190..2198
    lib/ruby-lint/definitions/core/webrick.rb on lines 2222..2230
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 176..184
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1683..1691
    lib/ruby-lint/definitions/gems/devise.rb on lines 1145..1153
    lib/ruby-lint/definitions/gems/devise.rb on lines 2124..2132
    lib/ruby-lint/definitions/gems/devise.rb on lines 2162..2170
    lib/ruby-lint/definitions/gems/devise.rb on lines 2182..2190
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 882..890
    lib/ruby-lint/definitions/gems/rspec.rb on lines 200..208
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1935..1943
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3051..3059
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7840..7848
    lib/ruby-lint/definitions/gems/test.rb on lines 767..775
    lib/ruby-lint/definitions/gems/test.rb on lines 2381..2389
    lib/ruby-lint/definitions/gems/test.rb on lines 2585..2593
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3769..3777
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3797..3805
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7031..7039
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1680..1688
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2327..2335
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2742..2750
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2770..2778
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4554..4562
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4582..4590
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4610..4618
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4638..4646
    lib/ruby-lint/definitions/rails/arel.rb on lines 2055..2063
    lib/ruby-lint/definitions/rails/arel.rb on lines 2083..2091
    lib/ruby-lint/definitions/rails/arel.rb on lines 5522..5530
    lib/ruby-lint/definitions/rails/arel.rb on lines 5550..5558
    lib/ruby-lint/definitions/rails/arel.rb on lines 7040..7048
    lib/ruby-lint/definitions/rails/arel.rb on lines 7068..7076

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

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

      defs.define_constant('Devise::Models::MissingAttribute') do |klass|
        klass.inherits(defs.constant_proxy('StandardError', RubyLint.registry))
    
        klass.define_instance_method('initialize') do |method|
          method.define_argument('attributes')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 16 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/drb.rb on lines 291..300
    lib/ruby-lint/definitions/core/name_error.rb on lines 7..16
    lib/ruby-lint/definitions/core/socket.rb on lines 2967..2976
    lib/ruby-lint/definitions/core/socket.rb on lines 3018..3027
    lib/ruby-lint/definitions/core/socket.rb on lines 3069..3078
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1534..1543
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 2790..2799
    lib/ruby-lint/definitions/gems/test.rb on lines 593..602
    lib/ruby-lint/definitions/gems/test.rb on lines 677..686
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1872..1881
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 3422..3431
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1528..1537
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1625..1634
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1643..1652
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1878..1887
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11653..11662

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::Models::Omniauthable::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('available_configs')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 5 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/syck.rb on lines 222..232
    lib/ruby-lint/definitions/gems/devise.rb on lines 1920..1930
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 2558..2568
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 8370..8380
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 8384..8394

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('Devise::Models::Timeoutable::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('available_configs')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 5 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/syck.rb on lines 222..232
    lib/ruby-lint/definitions/gems/devise.rb on lines 1753..1763
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 2558..2568
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 8370..8380
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 8384..8394

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

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

      defs.define_constant('Devise::Models::Trackable') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('required_fields') do |method|
          method.define_argument('klass')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 53 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/drb.rb on lines 137..145
    lib/ruby-lint/definitions/core/drb_id_conv.rb on lines 7..15
    lib/ruby-lint/definitions/core/gem.rb on lines 1023..1031
    lib/ruby-lint/definitions/core/resolv.rb on lines 518..526
    lib/ruby-lint/definitions/gems/devise.rb on lines 969..977
    lib/ruby-lint/definitions/gems/glib.rb on lines 569..577
    lib/ruby-lint/definitions/gems/glib.rb on lines 2955..2963
    lib/ruby-lint/definitions/gems/glib.rb on lines 3837..3845
    lib/ruby-lint/definitions/gems/glib.rb on lines 3894..3902
    lib/ruby-lint/definitions/gems/glib.rb on lines 4075..4083
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 446..454
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 6118..6126
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 846..854
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4040..4048
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4060..4068
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4085..4093
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4115..4123
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4175..4183
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4277..4285
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4299..4307
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4330..4338
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4372..4380
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4390..4398
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4433..4441
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5497..5505
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5517..5525
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5566..5574
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5578..5586
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5598..5606
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5937..5945
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5988..5996
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 6422..6430
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 7970..7978
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 7982..7990
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5359..5367
    lib/ruby-lint/definitions/gems/tree.rb on lines 198..206
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1855..1863
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2721..2729
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2941..2949
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 3264..3272
    lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1106..1114
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3663..3671
    lib/ruby-lint/definitions/rails/active_model.rb on lines 293..301
    lib/ruby-lint/definitions/rails/active_model.rb on lines 328..336
    lib/ruby-lint/definitions/rails/active_record.rb on lines 707..715
    lib/ruby-lint/definitions/rails/active_record.rb on lines 3139..3147
    lib/ruby-lint/definitions/rails/active_record.rb on lines 6170..6178
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7433..7441
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1411..1419
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1488..1496
    lib/ruby-lint/definitions/rails/active_support.rb on lines 3147..3155
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4307..4315
    lib/ruby-lint/definitions/rails/arel.rb on lines 7256..7264

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

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

      defs.define_constant('Devise::Delegator') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('call') do |method|
          method.define_argument('env')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 53 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/drb.rb on lines 137..145
    lib/ruby-lint/definitions/core/drb_id_conv.rb on lines 7..15
    lib/ruby-lint/definitions/core/gem.rb on lines 1023..1031
    lib/ruby-lint/definitions/core/resolv.rb on lines 518..526
    lib/ruby-lint/definitions/gems/devise.rb on lines 1934..1942
    lib/ruby-lint/definitions/gems/glib.rb on lines 569..577
    lib/ruby-lint/definitions/gems/glib.rb on lines 2955..2963
    lib/ruby-lint/definitions/gems/glib.rb on lines 3837..3845
    lib/ruby-lint/definitions/gems/glib.rb on lines 3894..3902
    lib/ruby-lint/definitions/gems/glib.rb on lines 4075..4083
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 446..454
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 6118..6126
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 846..854
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4040..4048
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4060..4068
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4085..4093
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4115..4123
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4175..4183
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4277..4285
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4299..4307
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4330..4338
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4372..4380
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4390..4398
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4433..4441
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5497..5505
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5517..5525
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5566..5574
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5578..5586
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5598..5606
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5937..5945
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 5988..5996
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 6422..6430
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 7970..7978
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 7982..7990
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5359..5367
    lib/ruby-lint/definitions/gems/tree.rb on lines 198..206
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1855..1863
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2721..2729
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2941..2949
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 3264..3272
    lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1106..1114
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3663..3671
    lib/ruby-lint/definitions/rails/active_model.rb on lines 293..301
    lib/ruby-lint/definitions/rails/active_model.rb on lines 328..336
    lib/ruby-lint/definitions/rails/active_record.rb on lines 707..715
    lib/ruby-lint/definitions/rails/active_record.rb on lines 3139..3147
    lib/ruby-lint/definitions/rails/active_record.rb on lines 6170..6178
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7433..7441
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1411..1419
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1488..1496
    lib/ruby-lint/definitions/rails/active_support.rb on lines 3147..3155
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4307..4315
    lib/ruby-lint/definitions/rails/arel.rb on lines 7256..7264

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

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

      defs.define_constant('Devise::Models::Registerable::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('new_with_session') do |method|
          method.define_argument('params')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/devise.rb and 39 other locations - About 15 mins to fix
    lib/ruby-lint/definitions/core/abbrev.rb on lines 7..12
    lib/ruby-lint/definitions/core/erb.rb on lines 255..260
    lib/ruby-lint/definitions/core/open_ssl.rb on lines 2774..2779
    lib/ruby-lint/definitions/core/option_parser.rb on lines 1263..1268
    lib/ruby-lint/definitions/core/option_parser.rb on lines 1282..1287
    lib/ruby-lint/definitions/core/uri.rb on lines 1051..1056
    lib/ruby-lint/definitions/core/uri.rb on lines 1319..1324
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 2837..2842
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 3606..3611
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 6807..6812
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 762..767
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3693..3698
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4187..4192
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 6376..6381
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 8524..8529
    lib/ruby-lint/definitions/gems/rspec.rb on lines 92..97
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2217..2222
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2226..2231
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6514..6519
    lib/ruby-lint/definitions/gems/test.rb on lines 1918..1923
    lib/ruby-lint/definitions/gems/test.rb on lines 2602..2607
    lib/ruby-lint/definitions/gems/test.rb on lines 2626..2631
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 967..972
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1015..1020
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2670..2675
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 659..664
    lib/ruby-lint/definitions/rails/action_view.rb on lines 526..531
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3675..3680
    lib/ruby-lint/definitions/rails/action_view.rb on lines 5274..5279
    lib/ruby-lint/definitions/rails/active_record.rb on lines 36..41
    lib/ruby-lint/definitions/rails/active_record.rb on lines 1877..1882
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5610..5615
    lib/ruby-lint/definitions/rails/active_record.rb on lines 9522..9527
    lib/ruby-lint/definitions/rails/active_support.rb on lines 701..706
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1500..1505
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4319..4324
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5166..5171
    lib/ruby-lint/definitions/rails/arel.rb on lines 7948..7953
    lib/ruby-lint/definitions/rails/rails.rb on lines 667..672

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

    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

    There are no issues that match your filters.

    Category
    Status