NodeRedis/node-redis

View on GitHub

Showing 539 of 539 total issues

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

describe('CLIENT SETNAME', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(CLIENT_SETNAME, 'name'),
      ['CLIENT', 'SETNAME', 'name']
Severity: Major
Found in packages/client/lib/commands/CLIENT_SETNAME.spec.ts and 1 other location - About 3 hrs to fix
packages/client/lib/commands/SCRIPT_DEBUG.spec.ts on lines 6..20

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

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('SCRIPT DEBUG', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(SCRIPT_DEBUG, 'NO'),
      ['SCRIPT', 'DEBUG', 'NO']
Severity: Major
Found in packages/client/lib/commands/SCRIPT_DEBUG.spec.ts and 1 other location - About 3 hrs to fix
packages/client/lib/commands/CLIENT_SETNAME.spec.ts on lines 7..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

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('MEMORY DOCTOR', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(MEMORY_DOCTOR),
      ['MEMORY', 'DOCTOR']
Severity: Major
Found in packages/client/lib/commands/MEMORY_DOCTOR.spec.ts and 4 other locations - About 3 hrs to fix
packages/client/lib/commands/CLIENT_ID.spec.ts on lines 6..20
packages/client/lib/commands/COMMAND_COUNT.spec.ts on lines 6..20
packages/client/lib/commands/LATENCY_DOCTOR.spec.ts on lines 6..20
packages/client/lib/commands/MEMORY_MALLOC-STATS.spec.ts on lines 6..20

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

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('CLIENT ID', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(CLIENT_ID),
      ['CLIENT', 'ID']
Severity: Major
Found in packages/client/lib/commands/CLIENT_ID.spec.ts and 4 other locations - About 3 hrs to fix
packages/client/lib/commands/COMMAND_COUNT.spec.ts on lines 6..20
packages/client/lib/commands/LATENCY_DOCTOR.spec.ts on lines 6..20
packages/client/lib/commands/MEMORY_DOCTOR.spec.ts on lines 6..20
packages/client/lib/commands/MEMORY_MALLOC-STATS.spec.ts on lines 6..20

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

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('LATENCY DOCTOR', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(LATENCY_DOCTOR),
      ['LATENCY', 'DOCTOR']
Severity: Major
Found in packages/client/lib/commands/LATENCY_DOCTOR.spec.ts and 4 other locations - About 3 hrs to fix
packages/client/lib/commands/CLIENT_ID.spec.ts on lines 6..20
packages/client/lib/commands/COMMAND_COUNT.spec.ts on lines 6..20
packages/client/lib/commands/MEMORY_DOCTOR.spec.ts on lines 6..20
packages/client/lib/commands/MEMORY_MALLOC-STATS.spec.ts on lines 6..20

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

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('MEMORY MALLOC-STATS', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(MEMORY_MALLOC_STATS),
      ['MEMORY', 'MALLOC-STATS']
Severity: Major
Found in packages/client/lib/commands/MEMORY_MALLOC-STATS.spec.ts and 4 other locations - About 3 hrs to fix
packages/client/lib/commands/CLIENT_ID.spec.ts on lines 6..20
packages/client/lib/commands/COMMAND_COUNT.spec.ts on lines 6..20
packages/client/lib/commands/LATENCY_DOCTOR.spec.ts on lines 6..20
packages/client/lib/commands/MEMORY_DOCTOR.spec.ts on lines 6..20

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

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('COMMAND COUNT', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(COMMAND_COUNT),
      ['COMMAND', 'COUNT']
Severity: Major
Found in packages/client/lib/commands/COMMAND_COUNT.spec.ts and 4 other locations - About 3 hrs to fix
packages/client/lib/commands/CLIENT_ID.spec.ts on lines 6..20
packages/client/lib/commands/LATENCY_DOCTOR.spec.ts on lines 6..20
packages/client/lib/commands/MEMORY_DOCTOR.spec.ts on lines 6..20
packages/client/lib/commands/MEMORY_MALLOC-STATS.spec.ts on lines 6..20

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

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('transformArguments', () => {
    it('without options', () => {
      assert.deepEqual(
        parseArgs(CURSOR_READ, 'index', '0'),
        ['FT.CURSOR', 'READ', 'index', '0']
Severity: Major
Found in packages/search/lib/commands/CURSOR_READ.spec.ts and 2 other locations - About 2 hrs to fix
packages/client/lib/commands/LMPOP.spec.ts on lines 9..25
packages/client/lib/commands/ZMPOP.spec.ts on lines 9..25

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

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('BGREWRITEAOF', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(BGREWRITEAOF),
      ['BGREWRITEAOF']
Severity: Major
Found in packages/client/lib/commands/BGREWRITEAOF.spec.ts and 1 other location - About 2 hrs to fix
packages/client/lib/commands/LASTSAVE.spec.ts on lines 6..20

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

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('transformArguments', () => {
    it('simple', () => {
      assert.deepEqual(
        parseArgs(LMPOP, 'key', 'LEFT'),
        ['LMPOP', '1', 'key', 'LEFT']
Severity: Major
Found in packages/client/lib/commands/LMPOP.spec.ts and 2 other locations - About 2 hrs to fix
packages/client/lib/commands/ZMPOP.spec.ts on lines 9..25
packages/search/lib/commands/CURSOR_READ.spec.ts on lines 7..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 94.

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('transformArguments', () => {
    it('simple', () => {
      assert.deepEqual(
        parseArgs(ZMPOP, 'key', 'MIN'),
        ['ZMPOP', '1', 'key', 'MIN']
Severity: Major
Found in packages/client/lib/commands/ZMPOP.spec.ts and 2 other locations - About 2 hrs to fix
packages/client/lib/commands/LMPOP.spec.ts on lines 9..25
packages/search/lib/commands/CURSOR_READ.spec.ts on lines 7..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 94.

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('LASTSAVE', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(LASTSAVE),
      ['LASTSAVE']
Severity: Major
Found in packages/client/lib/commands/LASTSAVE.spec.ts and 1 other location - About 2 hrs to fix
packages/client/lib/commands/BGREWRITEAOF.spec.ts on lines 6..20

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

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

          if (testUtils.isVersionGreaterThan([7, 0])) {
            assert.equal(typeof item.multiMem, 'number');
            assert.equal(typeof item.resp, 'number');

            if (testUtils.isVersionGreaterThan([7, 0, 3])) {
Severity: Major
Found in packages/client/lib/commands/CLIENT_LIST.spec.ts and 1 other location - About 2 hrs to fix
packages/client/lib/commands/CLIENT_INFO.spec.ts on lines 42..49

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

    if (testUtils.isVersionGreaterThan([7, 0])) {
      assert.equal(typeof reply.multiMem, 'number');
      assert.equal(typeof reply.resp, 'number');

      if (testUtils.isVersionGreaterThan([7, 0, 3])) {
Severity: Major
Found in packages/client/lib/commands/CLIENT_INFO.spec.ts and 1 other location - About 2 hrs to fix
packages/client/lib/commands/CLIENT_LIST.spec.ts on lines 66..73

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

  describe('transformArguments', () => {
    it('string', () => {
      assert.deepEqual(
        parseArgs(ZDIFFSTORE, 'destination', 'key'),
        ['ZDIFFSTORE', 'destination', '1', 'key']
Severity: Major
Found in packages/client/lib/commands/ZDIFFSTORE.spec.ts and 2 other locations - About 2 hrs to fix
packages/bloom/lib/commands/t-digest/MERGE.spec.ts on lines 8..22
packages/client/lib/commands/ACL_SETUSER.spec.ts on lines 9..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 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

    describe('source', () => {
      it('string', () => {
        assert.deepEqual(
          parseArgs(MERGE, 'destination', 'source'),
          ['TDIGEST.MERGE', 'destination', '1', 'source']
Severity: Major
Found in packages/bloom/lib/commands/t-digest/MERGE.spec.ts and 2 other locations - About 2 hrs to fix
packages/client/lib/commands/ACL_SETUSER.spec.ts on lines 9..23
packages/client/lib/commands/ZDIFFSTORE.spec.ts on lines 9..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 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

export default async (host) => {
  const client = createClient({
    socket: {
      host
    },
Severity: Major
Found in benchmark/lib/ping/local-resp2.js and 1 other location - About 2 hrs to fix
benchmark/lib/ping/local-resp3.js on lines 3..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 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

  testUtils.testWithClient('client.aclList', async client => {
    const users = await client.aclList();
    assert.ok(Array.isArray(users));
    for (const user of users) {
      assert.equal(typeof user, 'string');
Severity: Major
Found in packages/client/lib/commands/ACL_LIST.spec.ts and 1 other location - About 2 hrs to fix
packages/client/lib/commands/ACL_CAT.spec.ts on lines 25..31

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

        sentinel.on('topology-change', (event: RedisSentinelEvent) => {
          tracer.push(`got topology-change event: ${JSON.stringify(event)}`);
          if (event.type === "SENTINEL_CHANGE") {
            tracer.push("got sentinel change event");
            sentinelChangeResolve(event.node);
Severity: Major
Found in packages/client/lib/sentinel/index.spec.ts and 1 other location - About 2 hrs to fix
packages/client/lib/sentinel/index.spec.ts on lines 1087..1093

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

export default async (host) => {
  const client = createClient({
    socket: {
      host
    },
Severity: Major
Found in benchmark/lib/ping/local-resp3.js and 1 other location - About 2 hrs to fix
benchmark/lib/ping/local-resp2.js on lines 3..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 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

Severity
Category
Status
Source
Language