YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

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

    klass.define_instance_method('audio_tag') do |method|
      method.define_rest_argument('sources')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 296..332

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

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

    klass.define_instance_method('audio_tag') do |method|
      method.define_rest_argument('sources')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 5044..5080

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

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

    klass.define_instance_method('assert_generates') do |method|
      method.define_argument('expected_path')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3290..3322
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 63..95

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

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('WEBrick::HTTPAuth::Htdigest') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('WEBrick::HTTPAuth::UserDB', RubyLint.registry))

    klass.define_instance_method('delete_passwd') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/core/webrick.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/core/webrick.rb on lines 724..756

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

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('ActionController::TestCase::RoutingAssertions') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('assert_generates') do |method|
      method.define_argument('expected_path')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 63..95
lib/ruby-lint/definitions/rails/action_view.rb on lines 6769..6801

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

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('ActionDispatch::Assertions::RoutingAssertions') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('assert_generates') do |method|
      method.define_argument('expected_path')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3290..3322
lib/ruby-lint/definitions/rails/action_view.rb on lines 6769..6801

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

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('WEBrick::HTTPAuth::Htpasswd') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('WEBrick::HTTPAuth::UserDB', RubyLint.registry))

    klass.define_instance_method('delete_passwd') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/core/webrick.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/core/webrick.rb on lines 663..695

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

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('Gtk::CellRendererAccel') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::CellRendererText', RubyLint.registry))

    klass.define_instance_method('accel_key')

Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 10756..10796

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

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('Gtk::MenuButton') do |klass|
    klass.inherits(defs.constant_proxy('Gtk::ToggleButton', RubyLint.registry))

    klass.define_instance_method('align_widget')

Severity: Major
Found in lib/ruby-lint/definitions/gems/gtk.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/gtk.rb on lines 3642..3682

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

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('Sinatra::Application::Stream') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('defer') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/sinatra.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1230..1266
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1562..1598

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

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('Sinatra::Base::Stream') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('defer') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/sinatra.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/sinatra.rb on lines 374..410
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1562..1598

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

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('Sinatra::Helpers::Stream') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('defer') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/sinatra.rb and 2 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/sinatra.rb on lines 374..410
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1230..1266

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

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

  defs.define_constant('RSpec::Core::Hooks::AfterHook::Group') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3864..3902
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4012..4050
lib/ruby-lint/definitions/gems/rspec.rb on lines 2297..2335
lib/ruby-lint/definitions/gems/rspec.rb on lines 2581..2619
lib/ruby-lint/definitions/gems/rspec.rb on lines 2815..2853
lib/ruby-lint/definitions/gems/rspec.rb on lines 3880..3918
lib/ruby-lint/definitions/gems/rspec.rb on lines 4219..4257
lib/ruby-lint/definitions/gems/rspec.rb on lines 4387..4425
lib/ruby-lint/definitions/gems/rspec.rb on lines 4575..4613
lib/ruby-lint/definitions/gems/rspec.rb on lines 4909..4947
lib/ruby-lint/definitions/gems/rspec.rb on lines 5384..5422
lib/ruby-lint/definitions/gems/rspec.rb on lines 5582..5620
lib/ruby-lint/definitions/gems/rspec.rb on lines 5762..5800
lib/ruby-lint/definitions/gems/rspec.rb on lines 5990..6028
lib/ruby-lint/definitions/gems/rspec.rb on lines 6172..6210
lib/ruby-lint/definitions/gems/rspec.rb on lines 6354..6392
lib/ruby-lint/definitions/gems/rspec.rb on lines 6533..6571
lib/ruby-lint/definitions/gems/rspec.rb on lines 6698..6736
lib/ruby-lint/definitions/gems/rspec.rb on lines 6915..6953
lib/ruby-lint/definitions/gems/rspec.rb on lines 7090..7128
lib/ruby-lint/definitions/gems/rspec.rb on lines 7278..7316
lib/ruby-lint/definitions/gems/rspec.rb on lines 7509..7547
lib/ruby-lint/definitions/gems/rspec.rb on lines 8217..8255
lib/ruby-lint/definitions/gems/rspec.rb on lines 8592..8630

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

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

  defs.define_constant('RSpec::Core::Notifications::CustomNotification::Group') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3864..3902
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4012..4050
lib/ruby-lint/definitions/gems/rspec.rb on lines 2297..2335
lib/ruby-lint/definitions/gems/rspec.rb on lines 2581..2619
lib/ruby-lint/definitions/gems/rspec.rb on lines 2815..2853
lib/ruby-lint/definitions/gems/rspec.rb on lines 3880..3918
lib/ruby-lint/definitions/gems/rspec.rb on lines 4048..4086
lib/ruby-lint/definitions/gems/rspec.rb on lines 4219..4257
lib/ruby-lint/definitions/gems/rspec.rb on lines 4387..4425
lib/ruby-lint/definitions/gems/rspec.rb on lines 4575..4613
lib/ruby-lint/definitions/gems/rspec.rb on lines 4909..4947
lib/ruby-lint/definitions/gems/rspec.rb on lines 5582..5620
lib/ruby-lint/definitions/gems/rspec.rb on lines 5762..5800
lib/ruby-lint/definitions/gems/rspec.rb on lines 5990..6028
lib/ruby-lint/definitions/gems/rspec.rb on lines 6172..6210
lib/ruby-lint/definitions/gems/rspec.rb on lines 6354..6392
lib/ruby-lint/definitions/gems/rspec.rb on lines 6533..6571
lib/ruby-lint/definitions/gems/rspec.rb on lines 6698..6736
lib/ruby-lint/definitions/gems/rspec.rb on lines 6915..6953
lib/ruby-lint/definitions/gems/rspec.rb on lines 7090..7128
lib/ruby-lint/definitions/gems/rspec.rb on lines 7278..7316
lib/ruby-lint/definitions/gems/rspec.rb on lines 7509..7547
lib/ruby-lint/definitions/gems/rspec.rb on lines 8217..8255
lib/ruby-lint/definitions/gems/rspec.rb on lines 8592..8630

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

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

  defs.define_constant('RSpec::Core::Notifications::SummaryNotification::Group') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3864..3902
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4012..4050
lib/ruby-lint/definitions/gems/rspec.rb on lines 2297..2335
lib/ruby-lint/definitions/gems/rspec.rb on lines 2581..2619
lib/ruby-lint/definitions/gems/rspec.rb on lines 2815..2853
lib/ruby-lint/definitions/gems/rspec.rb on lines 3880..3918
lib/ruby-lint/definitions/gems/rspec.rb on lines 4048..4086
lib/ruby-lint/definitions/gems/rspec.rb on lines 4219..4257
lib/ruby-lint/definitions/gems/rspec.rb on lines 4387..4425
lib/ruby-lint/definitions/gems/rspec.rb on lines 4575..4613
lib/ruby-lint/definitions/gems/rspec.rb on lines 4909..4947
lib/ruby-lint/definitions/gems/rspec.rb on lines 5384..5422
lib/ruby-lint/definitions/gems/rspec.rb on lines 5582..5620
lib/ruby-lint/definitions/gems/rspec.rb on lines 5762..5800
lib/ruby-lint/definitions/gems/rspec.rb on lines 5990..6028
lib/ruby-lint/definitions/gems/rspec.rb on lines 6172..6210
lib/ruby-lint/definitions/gems/rspec.rb on lines 6354..6392
lib/ruby-lint/definitions/gems/rspec.rb on lines 6533..6571
lib/ruby-lint/definitions/gems/rspec.rb on lines 6698..6736
lib/ruby-lint/definitions/gems/rspec.rb on lines 6915..6953
lib/ruby-lint/definitions/gems/rspec.rb on lines 7090..7128
lib/ruby-lint/definitions/gems/rspec.rb on lines 7278..7316
lib/ruby-lint/definitions/gems/rspec.rb on lines 8217..8255
lib/ruby-lint/definitions/gems/rspec.rb on lines 8592..8630

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

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

  defs.define_constant('RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage::Group') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3864..3902
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4012..4050
lib/ruby-lint/definitions/gems/rspec.rb on lines 2297..2335
lib/ruby-lint/definitions/gems/rspec.rb on lines 2581..2619
lib/ruby-lint/definitions/gems/rspec.rb on lines 3880..3918
lib/ruby-lint/definitions/gems/rspec.rb on lines 4048..4086
lib/ruby-lint/definitions/gems/rspec.rb on lines 4219..4257
lib/ruby-lint/definitions/gems/rspec.rb on lines 4387..4425
lib/ruby-lint/definitions/gems/rspec.rb on lines 4575..4613
lib/ruby-lint/definitions/gems/rspec.rb on lines 4909..4947
lib/ruby-lint/definitions/gems/rspec.rb on lines 5384..5422
lib/ruby-lint/definitions/gems/rspec.rb on lines 5582..5620
lib/ruby-lint/definitions/gems/rspec.rb on lines 5762..5800
lib/ruby-lint/definitions/gems/rspec.rb on lines 5990..6028
lib/ruby-lint/definitions/gems/rspec.rb on lines 6172..6210
lib/ruby-lint/definitions/gems/rspec.rb on lines 6354..6392
lib/ruby-lint/definitions/gems/rspec.rb on lines 6533..6571
lib/ruby-lint/definitions/gems/rspec.rb on lines 6698..6736
lib/ruby-lint/definitions/gems/rspec.rb on lines 6915..6953
lib/ruby-lint/definitions/gems/rspec.rb on lines 7090..7128
lib/ruby-lint/definitions/gems/rspec.rb on lines 7278..7316
lib/ruby-lint/definitions/gems/rspec.rb on lines 7509..7547
lib/ruby-lint/definitions/gems/rspec.rb on lines 8217..8255
lib/ruby-lint/definitions/gems/rspec.rb on lines 8592..8630

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

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

  defs.define_constant('RSpec::Core::Hooks::Hook::Group') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3864..3902
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4012..4050
lib/ruby-lint/definitions/gems/rspec.rb on lines 2297..2335
lib/ruby-lint/definitions/gems/rspec.rb on lines 2581..2619
lib/ruby-lint/definitions/gems/rspec.rb on lines 2815..2853
lib/ruby-lint/definitions/gems/rspec.rb on lines 3880..3918
lib/ruby-lint/definitions/gems/rspec.rb on lines 4048..4086
lib/ruby-lint/definitions/gems/rspec.rb on lines 4219..4257
lib/ruby-lint/definitions/gems/rspec.rb on lines 4387..4425
lib/ruby-lint/definitions/gems/rspec.rb on lines 4909..4947
lib/ruby-lint/definitions/gems/rspec.rb on lines 5384..5422
lib/ruby-lint/definitions/gems/rspec.rb on lines 5582..5620
lib/ruby-lint/definitions/gems/rspec.rb on lines 5762..5800
lib/ruby-lint/definitions/gems/rspec.rb on lines 5990..6028
lib/ruby-lint/definitions/gems/rspec.rb on lines 6172..6210
lib/ruby-lint/definitions/gems/rspec.rb on lines 6354..6392
lib/ruby-lint/definitions/gems/rspec.rb on lines 6533..6571
lib/ruby-lint/definitions/gems/rspec.rb on lines 6698..6736
lib/ruby-lint/definitions/gems/rspec.rb on lines 6915..6953
lib/ruby-lint/definitions/gems/rspec.rb on lines 7090..7128
lib/ruby-lint/definitions/gems/rspec.rb on lines 7278..7316
lib/ruby-lint/definitions/gems/rspec.rb on lines 7509..7547
lib/ruby-lint/definitions/gems/rspec.rb on lines 8217..8255
lib/ruby-lint/definitions/gems/rspec.rb on lines 8592..8630

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

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

  defs.define_constant('RSpec::Core::Notifications::SkippedExampleNotification::Group') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3864..3902
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4012..4050
lib/ruby-lint/definitions/gems/rspec.rb on lines 2297..2335
lib/ruby-lint/definitions/gems/rspec.rb on lines 2581..2619
lib/ruby-lint/definitions/gems/rspec.rb on lines 2815..2853
lib/ruby-lint/definitions/gems/rspec.rb on lines 3880..3918
lib/ruby-lint/definitions/gems/rspec.rb on lines 4048..4086
lib/ruby-lint/definitions/gems/rspec.rb on lines 4219..4257
lib/ruby-lint/definitions/gems/rspec.rb on lines 4387..4425
lib/ruby-lint/definitions/gems/rspec.rb on lines 4575..4613
lib/ruby-lint/definitions/gems/rspec.rb on lines 4909..4947
lib/ruby-lint/definitions/gems/rspec.rb on lines 5384..5422
lib/ruby-lint/definitions/gems/rspec.rb on lines 5582..5620
lib/ruby-lint/definitions/gems/rspec.rb on lines 5762..5800
lib/ruby-lint/definitions/gems/rspec.rb on lines 5990..6028
lib/ruby-lint/definitions/gems/rspec.rb on lines 6172..6210
lib/ruby-lint/definitions/gems/rspec.rb on lines 6354..6392
lib/ruby-lint/definitions/gems/rspec.rb on lines 6533..6571
lib/ruby-lint/definitions/gems/rspec.rb on lines 6698..6736
lib/ruby-lint/definitions/gems/rspec.rb on lines 6915..6953
lib/ruby-lint/definitions/gems/rspec.rb on lines 7278..7316
lib/ruby-lint/definitions/gems/rspec.rb on lines 7509..7547
lib/ruby-lint/definitions/gems/rspec.rb on lines 8217..8255
lib/ruby-lint/definitions/gems/rspec.rb on lines 8592..8630

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

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

  defs.define_constant('RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage::Group') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3864..3902
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4012..4050
lib/ruby-lint/definitions/gems/rspec.rb on lines 2297..2335
lib/ruby-lint/definitions/gems/rspec.rb on lines 2815..2853
lib/ruby-lint/definitions/gems/rspec.rb on lines 3880..3918
lib/ruby-lint/definitions/gems/rspec.rb on lines 4048..4086
lib/ruby-lint/definitions/gems/rspec.rb on lines 4219..4257
lib/ruby-lint/definitions/gems/rspec.rb on lines 4387..4425
lib/ruby-lint/definitions/gems/rspec.rb on lines 4575..4613
lib/ruby-lint/definitions/gems/rspec.rb on lines 4909..4947
lib/ruby-lint/definitions/gems/rspec.rb on lines 5384..5422
lib/ruby-lint/definitions/gems/rspec.rb on lines 5582..5620
lib/ruby-lint/definitions/gems/rspec.rb on lines 5762..5800
lib/ruby-lint/definitions/gems/rspec.rb on lines 5990..6028
lib/ruby-lint/definitions/gems/rspec.rb on lines 6172..6210
lib/ruby-lint/definitions/gems/rspec.rb on lines 6354..6392
lib/ruby-lint/definitions/gems/rspec.rb on lines 6533..6571
lib/ruby-lint/definitions/gems/rspec.rb on lines 6698..6736
lib/ruby-lint/definitions/gems/rspec.rb on lines 6915..6953
lib/ruby-lint/definitions/gems/rspec.rb on lines 7090..7128
lib/ruby-lint/definitions/gems/rspec.rb on lines 7278..7316
lib/ruby-lint/definitions/gems/rspec.rb on lines 7509..7547
lib/ruby-lint/definitions/gems/rspec.rb on lines 8217..8255
lib/ruby-lint/definitions/gems/rspec.rb on lines 8592..8630

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

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

  defs.define_constant('RSpec::Core::Notifications::DeprecationNotification::Group') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 24 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3864..3902
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4012..4050
lib/ruby-lint/definitions/gems/rspec.rb on lines 2297..2335
lib/ruby-lint/definitions/gems/rspec.rb on lines 2581..2619
lib/ruby-lint/definitions/gems/rspec.rb on lines 2815..2853
lib/ruby-lint/definitions/gems/rspec.rb on lines 3880..3918
lib/ruby-lint/definitions/gems/rspec.rb on lines 4048..4086
lib/ruby-lint/definitions/gems/rspec.rb on lines 4219..4257
lib/ruby-lint/definitions/gems/rspec.rb on lines 4387..4425
lib/ruby-lint/definitions/gems/rspec.rb on lines 4575..4613
lib/ruby-lint/definitions/gems/rspec.rb on lines 4909..4947
lib/ruby-lint/definitions/gems/rspec.rb on lines 5384..5422
lib/ruby-lint/definitions/gems/rspec.rb on lines 5762..5800
lib/ruby-lint/definitions/gems/rspec.rb on lines 5990..6028
lib/ruby-lint/definitions/gems/rspec.rb on lines 6172..6210
lib/ruby-lint/definitions/gems/rspec.rb on lines 6354..6392
lib/ruby-lint/definitions/gems/rspec.rb on lines 6533..6571
lib/ruby-lint/definitions/gems/rspec.rb on lines 6698..6736
lib/ruby-lint/definitions/gems/rspec.rb on lines 6915..6953
lib/ruby-lint/definitions/gems/rspec.rb on lines 7090..7128
lib/ruby-lint/definitions/gems/rspec.rb on lines 7278..7316
lib/ruby-lint/definitions/gems/rspec.rb on lines 7509..7547
lib/ruby-lint/definitions/gems/rspec.rb on lines 8217..8255
lib/ruby-lint/definitions/gems/rspec.rb on lines 8592..8630

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

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