YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('Gem::SilentUI') do |klass|
    klass.inherits(defs.constant_proxy('Gem::StreamUI', RubyLint.registry))

    klass.define_instance_method('download_reporter') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/gem.rb and 6 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 15416..15426
lib/ruby-lint/definitions/gems/gtk.rb on lines 20261..20271
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4622..4632
lib/ruby-lint/definitions/gems/rspec.rb on lines 923..933
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 960..970
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1081..1091

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

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

    klass.define_instance_method('action_methods')

Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 7 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 9806..9816
lib/ruby-lint/definitions/gems/gtk.rb on lines 11682..11692
lib/ruby-lint/definitions/gems/gtk.rb on lines 12575..12585
lib/ruby-lint/definitions/gems/gtk.rb on lines 13321..13331
lib/ruby-lint/definitions/gems/gtk.rb on lines 13355..13365
lib/ruby-lint/definitions/gems/gtk.rb on lines 13389..13399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4408..4418

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

  defs.define_constant('Mongoid::Fields::Localized') do |klass|
    klass.inherits(defs.constant_proxy('Mongoid::Fields::Standard', RubyLint.registry))

    klass.define_instance_method('demongoize') do |method|
      method.define_argument('object')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 6 other locations - About 30 mins to fix
lib/ruby-lint/definitions/core/gem.rb on lines 1745..1755
lib/ruby-lint/definitions/gems/gtk.rb on lines 15416..15426
lib/ruby-lint/definitions/gems/gtk.rb on lines 20261..20271
lib/ruby-lint/definitions/gems/rspec.rb on lines 923..933
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 960..970
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1081..1091

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

  defs.define_constant('Gtk::RadioToolButton') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::ToggleToolButton', RubyLint.registry))

    klass.define_instance_method('group')

Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 7 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 9806..9816
lib/ruby-lint/definitions/gems/gtk.rb on lines 11682..11692
lib/ruby-lint/definitions/gems/gtk.rb on lines 12575..12585
lib/ruby-lint/definitions/gems/gtk.rb on lines 13321..13331
lib/ruby-lint/definitions/gems/gtk.rb on lines 13355..13365
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4408..4418
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1055..1065

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

  defs.define_constant('Gtk::SeparatorToolItem') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::ToolItem', RubyLint.registry))

    klass.define_instance_method('draw=') do |method|
      method.define_argument('val')
Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 6 other locations - About 30 mins to fix
lib/ruby-lint/definitions/core/gem.rb on lines 1745..1755
lib/ruby-lint/definitions/gems/gtk.rb on lines 20261..20271
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4622..4632
lib/ruby-lint/definitions/gems/rspec.rb on lines 923..933
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 960..970
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1081..1091

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

  defs.define_constant('Gtk::Invisible') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::Widget', RubyLint.registry))

    klass.define_instance_method('screen')

Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 7 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 11682..11692
lib/ruby-lint/definitions/gems/gtk.rb on lines 12575..12585
lib/ruby-lint/definitions/gems/gtk.rb on lines 13321..13331
lib/ruby-lint/definitions/gems/gtk.rb on lines 13355..13365
lib/ruby-lint/definitions/gems/gtk.rb on lines 13389..13399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4408..4418
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1055..1065

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

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

    klass.define_instance_method('orientation')

Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 7 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 9806..9816
lib/ruby-lint/definitions/gems/gtk.rb on lines 12575..12585
lib/ruby-lint/definitions/gems/gtk.rb on lines 13321..13331
lib/ruby-lint/definitions/gems/gtk.rb on lines 13355..13365
lib/ruby-lint/definitions/gems/gtk.rb on lines 13389..13399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4408..4418
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1055..1065

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

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

    klass.define_method('add') do |method|
      method.define_rest_argument('arg1')
Severity: Minor
Found in lib/ruby-lint/definitions/gems/glib.rb and 3 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1906..1917
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 8 locations. Consider refactoring.
Open

  defs.define_constant('Mongoid::Extensions::Time::ClassMethods') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('configured')

Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 7 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 9806..9816
lib/ruby-lint/definitions/gems/gtk.rb on lines 11682..11692
lib/ruby-lint/definitions/gems/gtk.rb on lines 12575..12585
lib/ruby-lint/definitions/gems/gtk.rb on lines 13321..13331
lib/ruby-lint/definitions/gems/gtk.rb on lines 13355..13365
lib/ruby-lint/definitions/gems/gtk.rb on lines 13389..13399
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1055..1065

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

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

    klass.define_instance_method('end_preview')

Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 7 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 9806..9816
lib/ruby-lint/definitions/gems/gtk.rb on lines 11682..11692
lib/ruby-lint/definitions/gems/gtk.rb on lines 13321..13331
lib/ruby-lint/definitions/gems/gtk.rb on lines 13355..13365
lib/ruby-lint/definitions/gems/gtk.rb on lines 13389..13399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4408..4418
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1055..1065

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

  defs.define_constant('Test::Unit::Attribute') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('included') do |method|
      method.define_argument('base')
Severity: Minor
Found in lib/ruby-lint/definitions/gems/test.rb and 3 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1906..1917
lib/ruby-lint/definitions/gems/glib.rb on lines 1435..1446
lib/ruby-lint/definitions/gems/gtk.rb on lines 22355..22366

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

  defs.define_constant('Gtk::RadioMenuItem') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::CheckMenuItem', RubyLint.registry))

    klass.define_instance_method('group')

Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 7 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 9806..9816
lib/ruby-lint/definitions/gems/gtk.rb on lines 11682..11692
lib/ruby-lint/definitions/gems/gtk.rb on lines 12575..12585
lib/ruby-lint/definitions/gems/gtk.rb on lines 13321..13331
lib/ruby-lint/definitions/gems/gtk.rb on lines 13389..13399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4408..4418
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1055..1065

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

  defs.define_constant('Gtk::RadioButton') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::CheckButton', RubyLint.registry))

    klass.define_instance_method('group')

Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 7 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 9806..9816
lib/ruby-lint/definitions/gems/gtk.rb on lines 11682..11692
lib/ruby-lint/definitions/gems/gtk.rb on lines 12575..12585
lib/ruby-lint/definitions/gems/gtk.rb on lines 13355..13365
lib/ruby-lint/definitions/gems/gtk.rb on lines 13389..13399
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4408..4418
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1055..1065

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

  defs.define_constant('ActionMailer::TestCase::Behavior::ClassMethods') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('determine_default_mailer') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_mailer.rb and 6 other locations - About 30 mins to fix
lib/ruby-lint/definitions/core/gem.rb on lines 1745..1755
lib/ruby-lint/definitions/gems/gtk.rb on lines 15416..15426
lib/ruby-lint/definitions/gems/gtk.rb on lines 20261..20271
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4622..4632
lib/ruby-lint/definitions/gems/rspec.rb on lines 923..933
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1081..1091

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

  defs.define_constant('Gtk::ToggleToolButton') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::ToolButton', RubyLint.registry))

    klass.define_instance_method('active=') do |method|
      method.define_argument('val')
Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 6 other locations - About 30 mins to fix
lib/ruby-lint/definitions/core/gem.rb on lines 1745..1755
lib/ruby-lint/definitions/gems/gtk.rb on lines 15416..15426
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4622..4632
lib/ruby-lint/definitions/gems/rspec.rb on lines 923..933
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 960..970
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 1081..1091

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

  defs.define_constant('ActionMailer::TestCase::ClassMethods') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('determine_default_mailer') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_mailer.rb and 6 other locations - About 30 mins to fix
lib/ruby-lint/definitions/core/gem.rb on lines 1745..1755
lib/ruby-lint/definitions/gems/gtk.rb on lines 15416..15426
lib/ruby-lint/definitions/gems/gtk.rb on lines 20261..20271
lib/ruby-lint/definitions/gems/mongoid.rb on lines 4622..4632
lib/ruby-lint/definitions/gems/rspec.rb on lines 923..933
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 960..970

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

  defs.define_constant('Gtk::VolumeButton') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::ScaleButton', RubyLint.registry))

    klass.define_instance_method('set_use_symbolic') do |method|
      method.define_argument('val')
Severity: Minor
Found in lib/ruby-lint/definitions/gems/gtk.rb and 3 other locations - About 30 mins to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 1906..1917
lib/ruby-lint/definitions/gems/glib.rb on lines 1435..1446
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 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 50 locations. Consider refactoring.
Open

  defs.define_constant('Arel::Nodes::StringJoin') do |klass|
    klass.inherits(defs.constant_proxy('Arel::Nodes::Join', RubyLint.registry))

    klass.define_instance_method('initialize') do |method|
      method.define_argument('left')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 49 other locations - About 25 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 8188..8195
lib/ruby-lint/definitions/gems/gtk.rb on lines 8199..8206
lib/ruby-lint/definitions/gems/gtk.rb on lines 8210..8217
lib/ruby-lint/definitions/gems/gtk.rb on lines 8272..8279
lib/ruby-lint/definitions/gems/gtk.rb on lines 8283..8290
lib/ruby-lint/definitions/gems/gtk.rb on lines 8294..8301
lib/ruby-lint/definitions/gems/gtk.rb on lines 11850..11857
lib/ruby-lint/definitions/gems/gtk.rb on lines 13119..13126
lib/ruby-lint/definitions/gems/gtk.rb on lines 22244..22251
lib/ruby-lint/definitions/gems/gtk.rb on lines 22255..22262
lib/ruby-lint/definitions/gems/gtk.rb on lines 22271..22278
lib/ruby-lint/definitions/gems/gtk.rb on lines 22282..22289
lib/ruby-lint/definitions/gems/gtk.rb on lines 22293..22300
lib/ruby-lint/definitions/gems/gtk.rb on lines 22304..22311
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3324..3331
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3340..3347
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3356..3363
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3438..3445
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3483..3490
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3548..3555
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3581..3588
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3627..3634
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3661..3668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3677..3684
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3707..3714
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3809..3816
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3825..3832
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3852..3859
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3883..3890
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3899..3906
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3915..3922
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3931..3938
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3947..3954
lib/ruby-lint/definitions/gems/test.rb on lines 1231..1238
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 418..425
lib/ruby-lint/definitions/rails/active_model.rb on lines 282..289
lib/ruby-lint/definitions/rails/active_record.rb on lines 5939..5946
lib/ruby-lint/definitions/rails/active_record.rb on lines 5974..5981
lib/ruby-lint/definitions/rails/active_record.rb on lines 5985..5992
lib/ruby-lint/definitions/rails/active_record.rb on lines 5996..6003
lib/ruby-lint/definitions/rails/active_record.rb on lines 6007..6014
lib/ruby-lint/definitions/rails/active_record.rb on lines 6018..6025
lib/ruby-lint/definitions/rails/active_record.rb on lines 6115..6122
lib/ruby-lint/definitions/rails/active_support.rb on lines 3340..3347
lib/ruby-lint/definitions/rails/active_support.rb on lines 3541..3548
lib/ruby-lint/definitions/rails/arel.rb on lines 1460..1467
lib/ruby-lint/definitions/rails/arel.rb on lines 2487..2494
lib/ruby-lint/definitions/rails/arel.rb on lines 4270..4277
lib/ruby-lint/definitions/rails/arel.rb on lines 5627..5634

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

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

    klass.define_instance_method('initialize') do |method|
      method.define_argument('owner')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 49 other locations - About 25 mins to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 8188..8195
lib/ruby-lint/definitions/gems/gtk.rb on lines 8199..8206
lib/ruby-lint/definitions/gems/gtk.rb on lines 8210..8217
lib/ruby-lint/definitions/gems/gtk.rb on lines 8272..8279
lib/ruby-lint/definitions/gems/gtk.rb on lines 8283..8290
lib/ruby-lint/definitions/gems/gtk.rb on lines 8294..8301
lib/ruby-lint/definitions/gems/gtk.rb on lines 11850..11857
lib/ruby-lint/definitions/gems/gtk.rb on lines 13119..13126
lib/ruby-lint/definitions/gems/gtk.rb on lines 22244..22251
lib/ruby-lint/definitions/gems/gtk.rb on lines 22255..22262
lib/ruby-lint/definitions/gems/gtk.rb on lines 22271..22278
lib/ruby-lint/definitions/gems/gtk.rb on lines 22282..22289
lib/ruby-lint/definitions/gems/gtk.rb on lines 22293..22300
lib/ruby-lint/definitions/gems/gtk.rb on lines 22304..22311
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3324..3331
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3340..3347
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3356..3363
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3438..3445
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3483..3490
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3548..3555
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3581..3588
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3627..3634
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3661..3668
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3677..3684
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3707..3714
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3809..3816
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3825..3832
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3852..3859
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3883..3890
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3899..3906
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3915..3922
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3931..3938
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3947..3954
lib/ruby-lint/definitions/gems/test.rb on lines 1231..1238
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 418..425
lib/ruby-lint/definitions/rails/active_model.rb on lines 282..289
lib/ruby-lint/definitions/rails/active_record.rb on lines 5939..5946
lib/ruby-lint/definitions/rails/active_record.rb on lines 5974..5981
lib/ruby-lint/definitions/rails/active_record.rb on lines 5996..6003
lib/ruby-lint/definitions/rails/active_record.rb on lines 6007..6014
lib/ruby-lint/definitions/rails/active_record.rb on lines 6018..6025
lib/ruby-lint/definitions/rails/active_record.rb on lines 6115..6122
lib/ruby-lint/definitions/rails/active_support.rb on lines 3340..3347
lib/ruby-lint/definitions/rails/active_support.rb on lines 3541..3548
lib/ruby-lint/definitions/rails/arel.rb on lines 1460..1467
lib/ruby-lint/definitions/rails/arel.rb on lines 2487..2494
lib/ruby-lint/definitions/rails/arel.rb on lines 4270..4277
lib/ruby-lint/definitions/rails/arel.rb on lines 5562..5569
lib/ruby-lint/definitions/rails/arel.rb on lines 5627..5634

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

Severity
Category
Status
Source
Language