NodeRedis/node-redis

View on GitHub

Showing 539 of 539 total issues

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

    it('with TRIM.strategy', () => {
      assert.deepEqual(
        parseArgs(XADD, 'key', '*', {
          field: 'value'
        }, {
Severity: Major
Found in packages/client/lib/commands/XADD.spec.ts and 1 other location - About 1 hr to fix
packages/client/lib/commands/XADD.spec.ts on lines 54..66

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

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

Function spawnRedisClusterNodeDockers has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function spawnRedisClusterNodeDockers(
  dockersConfig: RedisClusterDockersConfig,
  serverArguments: Array<string>,
  fromSlot: number,
  toSlot: number
Severity: Minor
Found in packages/test-utils/lib/dockers.ts - About 1 hr to fix

    Function spawnRedisClusterDockers has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    async function spawnRedisClusterDockers(
      dockersConfig: RedisClusterDockersConfig,
      serverArguments: Array<string>
    ): Promise<Array<RedisServerDocker>> {
      const numberOfMasters = dockersConfig.numberOfMasters ?? 2,
    Severity: Minor
    Found in packages/test-utils/lib/dockers.ts - About 1 hr to fix

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

          const [, reply] = await Promise.all([
            client.ts.add('key', 0, 0, {
              LABELS: { label: 'value' }
            }),
            client.ts.mGet('label=value')
      Severity: Major
      Found in packages/time-series/lib/commands/MGET.spec.ts and 1 other location - About 1 hr to fix
      packages/time-series/lib/commands/MGET_WITHLABELS.spec.ts on lines 15..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 61.

      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

          it('with NX (backwards compatibility)', () => {
            assert.deepEqual(
              parseArgs(GEOADD, 'key', {
                longitude: 1,
                latitude: 2,
      Severity: Major
      Found in packages/client/lib/commands/GEOADD.spec.ts and 1 other location - About 1 hr to fix
      packages/client/lib/commands/GEOADD.spec.ts on lines 60..71

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

      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

          it('with CH', () => {
            assert.deepEqual(
              parseArgs(GEOADD, 'key', {
                longitude: 1,
                latitude: 2,
      Severity: Major
      Found in packages/client/lib/commands/GEOADD.spec.ts and 1 other location - About 1 hr to fix
      packages/client/lib/commands/GEOADD.spec.ts on lines 47..58

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

      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

          const [, reply] = await Promise.all([
            client.ts.add('key', 0, 0, {
              LABELS: { label: 'value' }
            }),
            client.ts.mGetWithLabels('label=value')
      Severity: Major
      Found in packages/time-series/lib/commands/MGET_WITHLABELS.spec.ts and 1 other location - About 1 hr to fix
      packages/time-series/lib/commands/MGET.spec.ts on lines 26..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 61.

      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

              it('with SEPARATOR', () => {
                assert.deepEqual(
                  parseArgs(CREATE, 'index', {
                    field: {
                      type: SCHEMA_FIELD_TYPE.TAG,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 3 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 234..244
      packages/search/lib/commands/CREATE.spec.ts on lines 247..257
      packages/search/lib/commands/CREATE.spec.ts on lines 272..282

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

      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

          it('with COUNT', () => {
            assert.deepEqual(
              parseArgs(XREADGROUP, 'group', 'consumer', {
                key: 'key',
                id: '0-0'
      Severity: Major
      Found in packages/client/lib/commands/XREADGROUP.spec.ts and 1 other location - About 1 hr to fix
      packages/client/lib/commands/XREADGROUP.spec.ts on lines 59..69

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

      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

          it('with BLOCK', () => {
            assert.deepEqual(
              parseArgs(XREADGROUP, 'group', 'consumer', {
                key: 'key',
                id: '0-0'
      Severity: Major
      Found in packages/client/lib/commands/XREADGROUP.spec.ts and 1 other location - About 1 hr to fix
      packages/client/lib/commands/XREADGROUP.spec.ts on lines 47..57

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

      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

              it('UNF', () => {
                assert.deepEqual(
                  parseArgs(CREATE, 'index', {
                    field: {
                      type: SCHEMA_FIELD_TYPE.TEXT,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 3 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 116..126
      packages/search/lib/commands/CREATE.spec.ts on lines 234..244
      packages/search/lib/commands/CREATE.spec.ts on lines 247..257

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

      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

            it('with AS', () => {
              assert.deepEqual(
                parseArgs(CREATE, 'index', {
                  field: {
                    type: SCHEMA_FIELD_TYPE.TEXT,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 3 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 116..126
      packages/search/lib/commands/CREATE.spec.ts on lines 234..244
      packages/search/lib/commands/CREATE.spec.ts on lines 272..282

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

      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

              it('with COORD_SYSTEM', () => {
                assert.deepEqual(
                  parseArgs(CREATE, 'index', {
                    field: {
                      type: SCHEMA_FIELD_TYPE.GEOSHAPE,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 3 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 116..126
      packages/search/lib/commands/CREATE.spec.ts on lines 247..257
      packages/search/lib/commands/CREATE.spec.ts on lines 272..282

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

      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

            it('with INDEXMISSING', () => {
              assert.deepEqual(
                parseArgs(CREATE, 'index', {
                  field: {
                    type: SCHEMA_FIELD_TYPE.TEXT,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 7 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 26..36
      packages/search/lib/commands/CREATE.spec.ts on lines 62..72
      packages/search/lib/commands/CREATE.spec.ts on lines 128..138
      packages/search/lib/commands/CREATE.spec.ts on lines 140..150
      packages/search/lib/commands/CREATE.spec.ts on lines 152..162
      packages/search/lib/commands/CREATE.spec.ts on lines 260..270
      packages/search/lib/commands/CREATE.spec.ts on lines 285..295

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

      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

              it('with WITHSUFFIXTRIE', () => {
                assert.deepEqual(
                  parseArgs(CREATE, 'index', {
                    field: {
                      type: SCHEMA_FIELD_TYPE.TAG,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 7 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 26..36
      packages/search/lib/commands/CREATE.spec.ts on lines 62..72
      packages/search/lib/commands/CREATE.spec.ts on lines 128..138
      packages/search/lib/commands/CREATE.spec.ts on lines 152..162
      packages/search/lib/commands/CREATE.spec.ts on lines 260..270
      packages/search/lib/commands/CREATE.spec.ts on lines 285..295
      packages/search/lib/commands/CREATE.spec.ts on lines 297..307

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

      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

          it('with LIMIT', () => {
            assert.deepEqual(
              parseArgs(ZRANGE_WITHSCORES, 'src', 0, 1, {
                LIMIT: {
                  offset: 0,
      Severity: Major
      Found in packages/client/lib/commands/ZRANGE_WITHSCORES.spec.ts and 1 other location - About 1 hr to fix
      packages/client/lib/commands/ZRANGEBYSCORE_WITHSCORES.spec.ts on lines 15..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 59.

      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

              it('true', () => {
                assert.deepEqual(
                  parseArgs(CREATE, 'index', {
                    field: {
                      type: SCHEMA_FIELD_TYPE.TEXT,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 7 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 26..36
      packages/search/lib/commands/CREATE.spec.ts on lines 62..72
      packages/search/lib/commands/CREATE.spec.ts on lines 128..138
      packages/search/lib/commands/CREATE.spec.ts on lines 140..150
      packages/search/lib/commands/CREATE.spec.ts on lines 152..162
      packages/search/lib/commands/CREATE.spec.ts on lines 285..295
      packages/search/lib/commands/CREATE.spec.ts on lines 297..307

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

      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

            it('with NOINDEX', () => {
              assert.deepEqual(
                parseArgs(CREATE, 'index', {
                  field: {
                    type: SCHEMA_FIELD_TYPE.TEXT,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 7 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 26..36
      packages/search/lib/commands/CREATE.spec.ts on lines 62..72
      packages/search/lib/commands/CREATE.spec.ts on lines 128..138
      packages/search/lib/commands/CREATE.spec.ts on lines 140..150
      packages/search/lib/commands/CREATE.spec.ts on lines 152..162
      packages/search/lib/commands/CREATE.spec.ts on lines 260..270
      packages/search/lib/commands/CREATE.spec.ts on lines 297..307

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

      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

              it('with CASESENSITIVE', () => {
                assert.deepEqual(
                  parseArgs(CREATE, 'index', {
                    field: {
                      type: SCHEMA_FIELD_TYPE.TAG,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 7 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 26..36
      packages/search/lib/commands/CREATE.spec.ts on lines 62..72
      packages/search/lib/commands/CREATE.spec.ts on lines 140..150
      packages/search/lib/commands/CREATE.spec.ts on lines 152..162
      packages/search/lib/commands/CREATE.spec.ts on lines 260..270
      packages/search/lib/commands/CREATE.spec.ts on lines 285..295
      packages/search/lib/commands/CREATE.spec.ts on lines 297..307

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

      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

              it('with WITHSUFFIXTRIE', () => {
                assert.deepEqual(
                  parseArgs(CREATE, 'index', {
                    field: {
                      type: SCHEMA_FIELD_TYPE.TEXT,
      Severity: Major
      Found in packages/search/lib/commands/CREATE.spec.ts and 7 other locations - About 1 hr to fix
      packages/search/lib/commands/CREATE.spec.ts on lines 26..36
      packages/search/lib/commands/CREATE.spec.ts on lines 128..138
      packages/search/lib/commands/CREATE.spec.ts on lines 140..150
      packages/search/lib/commands/CREATE.spec.ts on lines 152..162
      packages/search/lib/commands/CREATE.spec.ts on lines 260..270
      packages/search/lib/commands/CREATE.spec.ts on lines 285..295
      packages/search/lib/commands/CREATE.spec.ts on lines 297..307

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

      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