YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/file.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/tcpserver.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/tcpsocket.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/ipsocket.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/errno.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/unixserver.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/basic_socket.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/udpsocket.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/float.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/math.rb on lines 133..174
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('add_typedef') do |method|
      method.define_argument('current')
Severity: Major
Found in lib/ruby-lint/definitions/core/math.rb and 14 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 228..269
lib/ruby-lint/definitions/core/errno.rb on lines 1960..2001
lib/ruby-lint/definitions/core/etc.rb on lines 45..86
lib/ruby-lint/definitions/core/file.rb on lines 659..700
lib/ruby-lint/definitions/core/float.rb on lines 181..222
lib/ruby-lint/definitions/core/io.rb on lines 570..611
lib/ruby-lint/definitions/core/ipsocket.rb on lines 182..223
lib/ruby-lint/definitions/core/process.rb on lines 325..366
lib/ruby-lint/definitions/core/socket.rb on lines 1550..1591
lib/ruby-lint/definitions/core/tcpserver.rb on lines 169..210
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 183..224
lib/ruby-lint/definitions/core/udpsocket.rb on lines 184..225
lib/ruby-lint/definitions/core/unixserver.rb on lines 168..209
lib/ruby-lint/definitions/core/unixsocket.rb on lines 197..238

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

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

    klass.define_method('all_waits') do |method|
      method.define_rest_argument('threads')
Severity: Major
Found in lib/ruby-lint/definitions/core/threads_wait.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/core/th_wait.rb on lines 7..52

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

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

    klass.define_method('all_waits') do |method|
      method.define_rest_argument('threads')
Severity: Major
Found in lib/ruby-lint/definitions/core/th_wait.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/core/threads_wait.rb on lines 7..52

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

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('Celluloid::PoolManager::LogEvent') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('<=>') do |method|
      method.define_argument('other')
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 1379..1423

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

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

    klass.define_method('included') do |method|
      method.define_argument('klass')
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 2200..2246

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

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

    klass.define_instance_method('<=>') do |method|
      method.define_argument('other')
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 2635..2679

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

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('Celluloid::PoolManager::FSM') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('included') do |method|
      method.define_argument('klass')
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 2 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 843..889

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

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

  defs.define_constant('Arel::Attributes::String::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('Arel::Visitors::Dot::Edge::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('ActiveRecord::Migration::ReversibleBlockHelper::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/core/webrick.rb on lines 599..645
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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

  defs.define_constant('WEBrick::HTTPAuth::DigestAuth::OpaqueInfo::Tms') do |klass|
    klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))

    klass.define_method('[]') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/core/webrick.rb and 23 other locations - About 2 hrs to fix
lib/ruby-lint/definitions/core/csv.rb on lines 476..522
lib/ruby-lint/definitions/core/irb.rb on lines 394..440
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2152..2198
lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6340..6386
lib/ruby-lint/definitions/gems/sinatra.rb on lines 1401..1447
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2390..2436
lib/ruby-lint/definitions/rails/active_model.rb on lines 228..274
lib/ruby-lint/definitions/rails/active_record.rb on lines 3966..4012
lib/ruby-lint/definitions/rails/active_record.rb on lines 4571..4617
lib/ruby-lint/definitions/rails/active_record.rb on lines 6650..6696
lib/ruby-lint/definitions/rails/active_record.rb on lines 6825..6871
lib/ruby-lint/definitions/rails/active_record.rb on lines 7169..7215
lib/ruby-lint/definitions/rails/arel.rb on lines 134..180
lib/ruby-lint/definitions/rails/arel.rb on lines 277..323
lib/ruby-lint/definitions/rails/arel.rb on lines 420..466
lib/ruby-lint/definitions/rails/arel.rb on lines 563..609
lib/ruby-lint/definitions/rails/arel.rb on lines 706..752
lib/ruby-lint/definitions/rails/arel.rb on lines 849..895
lib/ruby-lint/definitions/rails/arel.rb on lines 992..1038
lib/ruby-lint/definitions/rails/arel.rb on lines 1135..1181
lib/ruby-lint/definitions/rails/arel.rb on lines 6971..7017
lib/ruby-lint/definitions/rails/arel.rb on lines 7392..7438
lib/ruby-lint/definitions/rails/sprockets.rb on lines 973..1019

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

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