NodeRedis/node-redis

View on GitHub

Showing 539 of 539 total issues

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

describe('ZRANK', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(ZRANK, 'key', 'member'),
      ['ZRANK', 'key', 'member']
Severity: Major
Found in packages/client/lib/commands/ZRANK.spec.ts and 5 other locations - About 4 hrs to fix
packages/client/lib/commands/GETSET.spec.ts on lines 6..23
packages/client/lib/commands/HGET.spec.ts on lines 6..23
packages/client/lib/commands/RPOPLPUSH.spec.ts on lines 6..23
packages/client/lib/commands/ZREVRANK.spec.ts on lines 6..23
packages/client/lib/commands/ZSCORE.spec.ts on lines 6..23

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

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

  describe('transformArguments', () => {
    it('simple', () => {
      assert.deepEqual(
        parseArgs(PUBSUB_SHARDNUMSUB),
        ['PUBSUB', 'SHARDNUMSUB']
Severity: Major
Found in packages/client/lib/commands/PUBSUB_SHARDNUMSUB.spec.ts and 1 other location - About 4 hrs to fix
packages/client/lib/commands/PUBSUB_NUMSUB.spec.ts on lines 7..28

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

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

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

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

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

Refactorings

Further Reading

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

describe('HEXISTS', () => {
  it('processCommand', () => {
    assert.deepEqual(
      parseArgs(HEXISTS, 'key', 'field'),
      ['HEXISTS', 'key', 'field']
Severity: Major
Found in packages/client/lib/commands/HEXISTS.spec.ts and 4 other locations - About 4 hrs to fix
packages/client/lib/commands/APPEND.spec.ts on lines 6..23
packages/client/lib/commands/HSTRLEN.spec.ts on lines 6..23
packages/client/lib/commands/SETNX .spec.ts on lines 6..23
packages/client/lib/commands/SISMEMBER.spec.ts on lines 6..23

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

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

describe('DECR', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(DECR, 'key'),
      ['DECR', 'key']
Severity: Major
Found in packages/client/lib/commands/DECR.spec.ts and 2 other locations - About 4 hrs to fix
packages/client/lib/commands/PTTL.spec.ts on lines 6..23
packages/client/lib/commands/TTL.spec.ts on lines 6..23

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

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

describe('TTL', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(TTL, 'key'),
      ['TTL', 'key']
Severity: Major
Found in packages/client/lib/commands/TTL.spec.ts and 2 other locations - About 4 hrs to fix
packages/client/lib/commands/DECR.spec.ts on lines 6..23
packages/client/lib/commands/PTTL.spec.ts on lines 6..23

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

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

describe('PTTL', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(PTTL, 'key'),
      ['PTTL', 'key']
Severity: Major
Found in packages/client/lib/commands/PTTL.spec.ts and 2 other locations - About 4 hrs to fix
packages/client/lib/commands/DECR.spec.ts on lines 6..23
packages/client/lib/commands/TTL.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('OBJECT IDLETIME', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(OBJECT_IDLETIME, 'key'),
      ['OBJECT', 'IDLETIME', 'key']
Severity: Major
Found in packages/client/lib/commands/OBJECT_IDLETIME.spec.ts and 3 other locations - About 4 hrs to fix
packages/client/lib/commands/OBJECT_ENCODING.spec.ts on lines 6..23
packages/client/lib/commands/OBJECT_FREQ.spec.ts on lines 6..23
packages/client/lib/commands/OBJECT_REFCOUNT.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('OBJECT ENCODING', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(OBJECT_ENCODING, 'key'),
      ['OBJECT', 'ENCODING', 'key']
Severity: Major
Found in packages/client/lib/commands/OBJECT_ENCODING.spec.ts and 3 other locations - About 4 hrs to fix
packages/client/lib/commands/OBJECT_FREQ.spec.ts on lines 6..23
packages/client/lib/commands/OBJECT_IDLETIME.spec.ts on lines 6..23
packages/client/lib/commands/OBJECT_REFCOUNT.spec.ts on lines 6..23

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

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

describe('HVALS', () => {
  it('processCommand', () => {
    assert.deepEqual(
      parseArgs(HVALS, 'key'),
      ['HVALS', 'key']
Severity: Major
Found in packages/client/lib/commands/HVALS.spec.ts and 2 other locations - About 4 hrs to fix
packages/client/lib/commands/HKEYS.spec.ts on lines 6..23
packages/client/lib/commands/SMEMBERS.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('OBJECT FREQ', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(OBJECT_FREQ, 'key'),
      ['OBJECT', 'FREQ', 'key']
Severity: Major
Found in packages/client/lib/commands/OBJECT_FREQ.spec.ts and 3 other locations - About 4 hrs to fix
packages/client/lib/commands/OBJECT_ENCODING.spec.ts on lines 6..23
packages/client/lib/commands/OBJECT_IDLETIME.spec.ts on lines 6..23
packages/client/lib/commands/OBJECT_REFCOUNT.spec.ts on lines 6..23

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

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

describe('SMEMBERS', () => {
  it('processCommand', () => {
    assert.deepEqual(
      parseArgs(SMEMBERS, 'key'),
      ['SMEMBERS', 'key']
Severity: Major
Found in packages/client/lib/commands/SMEMBERS.spec.ts and 2 other locations - About 4 hrs to fix
packages/client/lib/commands/HKEYS.spec.ts on lines 6..23
packages/client/lib/commands/HVALS.spec.ts on lines 6..23

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

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

describe('HKEYS', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(HKEYS, 'key'),
      ['HKEYS', 'key']
Severity: Major
Found in packages/client/lib/commands/HKEYS.spec.ts and 2 other locations - About 4 hrs to fix
packages/client/lib/commands/HVALS.spec.ts on lines 6..23
packages/client/lib/commands/SMEMBERS.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('OBJECT REFCOUNT', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(OBJECT_REFCOUNT, 'key'),
      ['OBJECT', 'REFCOUNT', 'key']
Severity: Major
Found in packages/client/lib/commands/OBJECT_REFCOUNT.spec.ts and 3 other locations - About 4 hrs to fix
packages/client/lib/commands/OBJECT_ENCODING.spec.ts on lines 6..23
packages/client/lib/commands/OBJECT_FREQ.spec.ts on lines 6..23
packages/client/lib/commands/OBJECT_IDLETIME.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('PERSIST', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(PERSIST, 'key'),
      ['PERSIST', 'key']
Severity: Major
Found in packages/client/lib/commands/PERSIST.spec.ts and 7 other locations - About 3 hrs to fix
packages/client/lib/commands/HLEN.spec.ts on lines 6..23
packages/client/lib/commands/INCR.spec.ts on lines 6..23
packages/client/lib/commands/LLEN.spec.ts on lines 6..23
packages/client/lib/commands/SCARD.spec.ts on lines 6..23
packages/client/lib/commands/STRLEN.spec.ts on lines 6..23
packages/client/lib/commands/XLEN.spec.ts on lines 6..23
packages/client/lib/commands/ZCARD.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('STRLEN', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(STRLEN, 'key'),
      ['STRLEN', 'key']
Severity: Major
Found in packages/client/lib/commands/STRLEN.spec.ts and 7 other locations - About 3 hrs to fix
packages/client/lib/commands/HLEN.spec.ts on lines 6..23
packages/client/lib/commands/INCR.spec.ts on lines 6..23
packages/client/lib/commands/LLEN.spec.ts on lines 6..23
packages/client/lib/commands/PERSIST.spec.ts on lines 6..23
packages/client/lib/commands/SCARD.spec.ts on lines 6..23
packages/client/lib/commands/XLEN.spec.ts on lines 6..23
packages/client/lib/commands/ZCARD.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('ZCARD', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(ZCARD, 'key'),
      ['ZCARD', 'key']
Severity: Major
Found in packages/client/lib/commands/ZCARD.spec.ts and 7 other locations - About 3 hrs to fix
packages/client/lib/commands/HLEN.spec.ts on lines 6..23
packages/client/lib/commands/INCR.spec.ts on lines 6..23
packages/client/lib/commands/LLEN.spec.ts on lines 6..23
packages/client/lib/commands/PERSIST.spec.ts on lines 6..23
packages/client/lib/commands/SCARD.spec.ts on lines 6..23
packages/client/lib/commands/STRLEN.spec.ts on lines 6..23
packages/client/lib/commands/XLEN.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('INCR', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(INCR, 'key'),
      ['INCR', 'key']
Severity: Major
Found in packages/client/lib/commands/INCR.spec.ts and 7 other locations - About 3 hrs to fix
packages/client/lib/commands/HLEN.spec.ts on lines 6..23
packages/client/lib/commands/LLEN.spec.ts on lines 6..23
packages/client/lib/commands/PERSIST.spec.ts on lines 6..23
packages/client/lib/commands/SCARD.spec.ts on lines 6..23
packages/client/lib/commands/STRLEN.spec.ts on lines 6..23
packages/client/lib/commands/XLEN.spec.ts on lines 6..23
packages/client/lib/commands/ZCARD.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('LLEN', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(LLEN, 'key'),
      ['LLEN', 'key']
Severity: Major
Found in packages/client/lib/commands/LLEN.spec.ts and 7 other locations - About 3 hrs to fix
packages/client/lib/commands/HLEN.spec.ts on lines 6..23
packages/client/lib/commands/INCR.spec.ts on lines 6..23
packages/client/lib/commands/PERSIST.spec.ts on lines 6..23
packages/client/lib/commands/SCARD.spec.ts on lines 6..23
packages/client/lib/commands/STRLEN.spec.ts on lines 6..23
packages/client/lib/commands/XLEN.spec.ts on lines 6..23
packages/client/lib/commands/ZCARD.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('GET', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(GET, 'key'),
      ['GET', 'key']
Severity: Major
Found in packages/client/lib/commands/GET.spec.ts and 5 other locations - About 3 hrs to fix
packages/client/lib/commands/DUMP.spec.ts on lines 6..23
packages/client/lib/commands/LPOP.spec.ts on lines 6..23
packages/client/lib/commands/RPOP.spec.ts on lines 6..23
packages/client/lib/commands/SPOP.spec.ts on lines 6..23
packages/client/lib/commands/SRANDMEMBER.spec.ts on lines 6..23

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

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

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

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

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

Refactorings

Further Reading

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

describe('SCARD', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(SCARD, 'key'),
      ['SCARD', 'key']
Severity: Major
Found in packages/client/lib/commands/SCARD.spec.ts and 7 other locations - About 3 hrs to fix
packages/client/lib/commands/HLEN.spec.ts on lines 6..23
packages/client/lib/commands/INCR.spec.ts on lines 6..23
packages/client/lib/commands/LLEN.spec.ts on lines 6..23
packages/client/lib/commands/PERSIST.spec.ts on lines 6..23
packages/client/lib/commands/STRLEN.spec.ts on lines 6..23
packages/client/lib/commands/XLEN.spec.ts on lines 6..23
packages/client/lib/commands/ZCARD.spec.ts on lines 6..23

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

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