NodeRedis/node-redis

View on GitHub

Showing 539 of 539 total issues

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

describe('SPOP', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(SPOP, 'key'),
      ['SPOP', 'key']
Severity: Major
Found in packages/client/lib/commands/SPOP.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/GET.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/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 6 locations. Consider refactoring.
Open

describe('LPOP', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(LPOP, 'key'),
      ['LPOP', 'key']
Severity: Major
Found in packages/client/lib/commands/LPOP.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/GET.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('HLEN', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(HLEN, 'key'),
      ['HLEN', 'key']
Severity: Major
Found in packages/client/lib/commands/HLEN.spec.ts and 7 other locations - About 3 hrs to fix
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
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('RPOP', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(RPOP, 'key'),
      ['RPOP', 'key']
Severity: Major
Found in packages/client/lib/commands/RPOP.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/GET.spec.ts on lines 6..23
packages/client/lib/commands/LPOP.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 6 locations. Consider refactoring.
Open

describe('SRANDMEMBER', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(SRANDMEMBER, 'key'),
      ['SRANDMEMBER', 'key']
Severity: Major
Found in packages/client/lib/commands/SRANDMEMBER.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/GET.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

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('XLEN', () => {
  it('processCommand', () => {
    assert.deepEqual(
      parseArgs(XLEN, 'key'),
      ['XLEN', 'key']
Severity: Major
Found in packages/client/lib/commands/XLEN.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/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('DUMP', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(DUMP, 'key'),
      ['DUMP', 'key']
Severity: Major
Found in packages/client/lib/commands/DUMP.spec.ts and 5 other locations - About 3 hrs to fix
packages/client/lib/commands/GET.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 2 locations. Consider refactoring.
Open

        describe('without options', () => {
          it('SCHEMA_FIELD_TYPE.TAG', () => {
            assert.deepEqual(
              parseArgs(CREATE, 'index', {
                field: SCHEMA_FIELD_TYPE.TAG
Severity: Major
Found in packages/search/lib/commands/CREATE.spec.ts and 1 other location - About 3 hrs to fix
packages/search/lib/commands/CREATE.spec.ts on lines 212..232

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

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('without options', () => {
          it('SCHEMA_FIELD_TYPE.GEOSHAPE', () => {
            assert.deepEqual(
              parseArgs(CREATE, 'index', {
                field: SCHEMA_FIELD_TYPE.GEOSHAPE
Severity: Major
Found in packages/search/lib/commands/CREATE.spec.ts and 1 other location - About 3 hrs to fix
packages/search/lib/commands/CREATE.spec.ts on lines 94..114

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

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('BF.MADD', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(MADD, 'key', ['1', '2']),
      ['BF.MADD', 'key', '1', '2']
Severity: Major
Found in packages/bloom/lib/commands/bloom/MADD.spec.ts and 1 other location - About 3 hrs to fix
packages/bloom/lib/commands/bloom/MEXISTS.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 112.

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('BF.MEXISTS', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(MEXISTS, 'key', ['1', '2']),
      ['BF.MEXISTS', 'key', '1', '2']
Severity: Major
Found in packages/bloom/lib/commands/bloom/MEXISTS.spec.ts and 1 other location - About 3 hrs to fix
packages/bloom/lib/commands/bloom/MADD.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 112.

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('with STOPWORDS', () => {
      it('string', () => {
        assert.deepEqual(
          parseArgs(CREATE, 'index', {}, {
            STOPWORDS: 'stopword'
Severity: Major
Found in packages/search/lib/commands/CREATE.spec.ts and 1 other location - About 3 hrs to fix
packages/search/lib/commands/CREATE.spec.ts on lines 319..337

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

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('with PREFIX', () => {
      it('string', () => {
        assert.deepEqual(
          parseArgs(CREATE, 'index', {}, {
            PREFIX: 'prefix'
Severity: Major
Found in packages/search/lib/commands/CREATE.spec.ts and 1 other location - About 3 hrs to fix
packages/search/lib/commands/CREATE.spec.ts on lines 447..465

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

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.testAll('xGroupCreateConsumer', async client => {
    const [, reply] = await Promise.all([
      client.xGroupCreate('key', 'group', '$', {
        MKSTREAM: true
      }),
Severity: Major
Found in packages/client/lib/commands/XGROUP_CREATECONSUMER.spec.ts and 1 other location - About 3 hrs to fix
packages/client/lib/commands/XGROUP_DELCONSUMER.spec.ts on lines 14..26

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

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.testAll('xGroupDelConsumer', async client => {
    const [, reply] = await Promise.all([
      client.xGroupCreate('key', 'group', '$', {
        MKSTREAM: true
      }),
Severity: Major
Found in packages/client/lib/commands/XGROUP_DELCONSUMER.spec.ts and 1 other location - About 3 hrs to fix
packages/client/lib/commands/XGROUP_CREATECONSUMER.spec.ts on lines 16..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 107.

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('CMS.INITBYDIM', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(INITBYDIM, 'key', 1000, 5),
      ['CMS.INITBYDIM', 'key', '1000', '5']
packages/bloom/lib/commands/count-min-sketch/INITBYPROB.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 105.

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('CMS.INITBYPROB', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(INITBYPROB, 'key', 0.001, 0.01),
      ['CMS.INITBYPROB', 'key', '0.001', '0.01']
packages/bloom/lib/commands/count-min-sketch/INITBYDIM.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 105.

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('CF.EXISTS', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(EXISTS, 'key', 'item'),
      ['CF.EXISTS', 'key', 'item']
Severity: Major
Found in packages/bloom/lib/commands/cuckoo/EXISTS.spec.ts and 4 other locations - About 3 hrs to fix
packages/bloom/lib/commands/bloom/ADD.spec.ts on lines 6..20
packages/bloom/lib/commands/bloom/EXISTS.spec.ts on lines 6..20
packages/bloom/lib/commands/cuckoo/ADD.spec.ts on lines 6..20
packages/bloom/lib/commands/cuckoo/ADDNX.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 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 5 locations. Consider refactoring.
Open

describe('BF.ADD', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(ADD, 'key', 'item'),
      ['BF.ADD', 'key', 'item']
Severity: Major
Found in packages/bloom/lib/commands/bloom/ADD.spec.ts and 4 other locations - About 3 hrs to fix
packages/bloom/lib/commands/bloom/EXISTS.spec.ts on lines 6..20
packages/bloom/lib/commands/cuckoo/ADD.spec.ts on lines 6..20
packages/bloom/lib/commands/cuckoo/ADDNX.spec.ts on lines 6..20
packages/bloom/lib/commands/cuckoo/EXISTS.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 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 5 locations. Consider refactoring.
Open

describe('CF.ADD', () => {
  it('transformArguments', () => {
    assert.deepEqual(
      parseArgs(ADD, 'key', 'item'),
      ['CF.ADD', 'key', 'item']
Severity: Major
Found in packages/bloom/lib/commands/cuckoo/ADD.spec.ts and 4 other locations - About 3 hrs to fix
packages/bloom/lib/commands/bloom/ADD.spec.ts on lines 6..20
packages/bloom/lib/commands/bloom/EXISTS.spec.ts on lines 6..20
packages/bloom/lib/commands/cuckoo/ADDNX.spec.ts on lines 6..20
packages/bloom/lib/commands/cuckoo/EXISTS.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 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