iamolegga/nest-nsq-transport

View on GitHub

Showing 24 of 24 total issues

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

    return new Promise<void>((resolve, reject) => {
      this.writer
        .on('closed', () => {
          this.logger.debug('NSQ client closed');
          resolve();
Severity: Major
Found in src/client.ts and 1 other location - About 4 hrs to fix
src/client.ts on lines 45..56

Duplicated Code

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

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

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

Tuning

This issue has a mass of 117.

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

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

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

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

Refactorings

Further Reading

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

    this.connected = new Promise<void>((resolve, reject) => {
      this.writer
        .on('ready', () => {
          this.logger.debug('NSQ client connected');
          resolve();
Severity: Major
Found in src/client.ts and 1 other location - About 4 hrs to fix
src/client.ts on lines 62..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 117.

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

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

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

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

Refactorings

Further Reading

Function handleMessage has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private handleMessage(pattern: NSQPattern) {
    return async (message: Message) => {
      this.handlingMessagesWG.add(1);

      const handler = this.getHandlerByPattern(pattern.toString());
Severity: Minor
Found in src/server.ts - About 1 hr to fix

    Function metadata has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      get metadata(): ModuleMetadata {
        const wg = this.wg;
        const token = this.clientToken;
        const data = Math.random().toString();
    
    
    Severity: Minor
    Found in __tests__/multi.spec.ts - About 1 hr to fix

      Function metadata has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        get metadata(): ModuleMetadata {
          const wg = this.wg;
          const token = this.clientToken;
          const data = Math.random().toString();
      
      
      Severity: Minor
      Found in __tests__/discard.spec.ts - About 1 hr to fix

        Function metadata has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          get metadata(): ModuleMetadata {
            const wg = this.wg;
            const token = this.clientToken;
            const data = Math.random().toString();
        
        
        Severity: Minor
        Found in __tests__/options.spec.ts - About 1 hr to fix

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

            @test
            async 'should send and receive same data in two channels'() {
              await this.app.get(this.ctrl).emit();
              await this.wg.wait();
            }
          Severity: Major
          Found in __tests__/multi.spec.ts and 6 other locations - About 1 hr to fix
          __tests__/ctx.spec.ts on lines 47..51
          __tests__/discard.spec.ts on lines 70..74
          __tests__/discard.spec.ts on lines 76..80
          __tests__/ignore-wrong-pattern.spec.ts on lines 47..51
          __tests__/mono.spec.ts on lines 44..48
          __tests__/options.spec.ts on lines 79..83

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

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

            @test
            async 'message goes to same handler when no discard handler'() {
              await this.app.get(this.ctrl).emit2();
              await this.wg.wait();
            }
          Severity: Major
          Found in __tests__/discard.spec.ts and 6 other locations - About 1 hr to fix
          __tests__/ctx.spec.ts on lines 47..51
          __tests__/discard.spec.ts on lines 70..74
          __tests__/ignore-wrong-pattern.spec.ts on lines 47..51
          __tests__/mono.spec.ts on lines 44..48
          __tests__/multi.spec.ts on lines 71..75
          __tests__/options.spec.ts on lines 79..83

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

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

            @test
            async 'message goes to discard handler'() {
              await this.app.get(this.ctrl).emit1();
              await this.wg.wait();
            }
          Severity: Major
          Found in __tests__/discard.spec.ts and 6 other locations - About 1 hr to fix
          __tests__/ctx.spec.ts on lines 47..51
          __tests__/discard.spec.ts on lines 76..80
          __tests__/ignore-wrong-pattern.spec.ts on lines 47..51
          __tests__/mono.spec.ts on lines 44..48
          __tests__/multi.spec.ts on lines 71..75
          __tests__/options.spec.ts on lines 79..83

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

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

            @test
            async 'options should be used'() {
              await this.app.get(this.ctrl).emit();
              await this.wg.wait();
            }
          Severity: Major
          Found in __tests__/options.spec.ts and 6 other locations - About 1 hr to fix
          __tests__/ctx.spec.ts on lines 47..51
          __tests__/discard.spec.ts on lines 70..74
          __tests__/discard.spec.ts on lines 76..80
          __tests__/ignore-wrong-pattern.spec.ts on lines 47..51
          __tests__/mono.spec.ts on lines 44..48
          __tests__/multi.spec.ts on lines 71..75

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

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

            @test
            async 'should send and receive same data'() {
              await this.app.get(this.ctrl).emit();
              await this.wg.wait();
            }
          Severity: Major
          Found in __tests__/mono.spec.ts and 6 other locations - About 1 hr to fix
          __tests__/ctx.spec.ts on lines 47..51
          __tests__/discard.spec.ts on lines 70..74
          __tests__/discard.spec.ts on lines 76..80
          __tests__/ignore-wrong-pattern.spec.ts on lines 47..51
          __tests__/multi.spec.ts on lines 71..75
          __tests__/options.spec.ts on lines 79..83

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

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

            @test
            async 'context shoud have original message and pattern'() {
              await this.app.get(this.ctrl).emit();
              await this.wg.wait();
            }
          Severity: Major
          Found in __tests__/ctx.spec.ts and 6 other locations - About 1 hr to fix
          __tests__/discard.spec.ts on lines 70..74
          __tests__/discard.spec.ts on lines 76..80
          __tests__/ignore-wrong-pattern.spec.ts on lines 47..51
          __tests__/mono.spec.ts on lines 44..48
          __tests__/multi.spec.ts on lines 71..75
          __tests__/options.spec.ts on lines 79..83

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

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

            @test
            async 'should send and receive same data'() {
              await this.app.get(this.ctrl).emit();
              await this.wg.wait();
            }
          Severity: Major
          Found in __tests__/ignore-wrong-pattern.spec.ts and 6 other locations - About 1 hr to fix
          __tests__/ctx.spec.ts on lines 47..51
          __tests__/discard.spec.ts on lines 70..74
          __tests__/discard.spec.ts on lines 76..80
          __tests__/mono.spec.ts on lines 44..48
          __tests__/multi.spec.ts on lines 71..75
          __tests__/options.spec.ts on lines 79..83

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

          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

            @test
            async 'send should throw'() {
              await expect(this.app.get(this.ctrl).emit()).rejects.toBeTruthy();
            }
          Severity: Major
          Found in __tests__/msg-pattern-sender.spec.ts and 1 other location - About 1 hr to fix
          __tests__/pattern.spec.ts on lines 33..36

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

          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

            @test
            async 'pattern should be only string'() {
              await expect(this.app.get(this.ctrl).emit()).rejects.toBeTruthy();
            }
          Severity: Major
          Found in __tests__/pattern.spec.ts and 1 other location - About 1 hr to fix
          __tests__/msg-pattern-sender.spec.ts on lines 32..35

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

          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

              reader.on('nsqd_connected', (host, port) =>
                this.logger.log(`${logPrefix} not connected to nsqd ${host}:${port}`),
              );
          Severity: Minor
          Found in src/server.ts and 1 other location - About 35 mins to fix
          src/server.ts on lines 116..118

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

          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

                @EventPattern('topic-mono/channel-mono')
                handle(event: unknown) {
                  expect(event).toBe(data);
                  wg.done();
                }
          Severity: Major
          Found in __tests__/mono.spec.ts and 5 other locations - About 35 mins to fix
          __tests__/discard.spec.ts on lines 41..45
          __tests__/ignore-wrong-pattern.spec.ts on lines 30..34
          __tests__/multi.spec.ts on lines 31..35
          __tests__/multi.spec.ts on lines 37..41
          __tests__/options.spec.ts on lines 48..52

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 46.

          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

              reader.on('nsqd_closed', (host, port) =>
                this.logger.log(`${logPrefix} nsqd closed ${host}:${port}`),
              );
          Severity: Minor
          Found in src/server.ts and 1 other location - About 35 mins to fix
          src/server.ts on lines 113..115

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

          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

                @EventPattern('topic-discard-1/channel-discard-1/discard')
                handleDiscarded1(event: unknown) {
                  expect(event).toBe(data);
                  wg.done();
                }
          Severity: Major
          Found in __tests__/discard.spec.ts and 5 other locations - About 35 mins to fix
          __tests__/ignore-wrong-pattern.spec.ts on lines 30..34
          __tests__/mono.spec.ts on lines 24..28
          __tests__/multi.spec.ts on lines 31..35
          __tests__/multi.spec.ts on lines 37..41
          __tests__/options.spec.ts on lines 48..52

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 46.

          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

                @EventPattern('topic-multi/channel-multi-1')
                handle1(event: unknown) {
                  expect(event).toBe(data);
                  wg.done();
                }
          Severity: Major
          Found in __tests__/multi.spec.ts and 5 other locations - About 35 mins to fix
          __tests__/discard.spec.ts on lines 41..45
          __tests__/ignore-wrong-pattern.spec.ts on lines 30..34
          __tests__/mono.spec.ts on lines 24..28
          __tests__/multi.spec.ts on lines 37..41
          __tests__/options.spec.ts on lines 48..52

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 46.

          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