rvalenciano/ngx-cron-jobs

View on GitHub

Showing 119 of 119 total issues

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

export const numeral = [
  {value: 1, label: '1st'},
  {value: 2, label: '2nd'},
  {value: 3, label: '3rd'},
  {value: 4, label: '4th'},
Severity: Major
Found in src/app/lib/fixture.spec.ts and 1 other location - About 2 days to fix
src/app/lib/services/data.service.ts on lines 37..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 374.

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

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

  private numeral: Array<CronJobsSelectOption> = [
    {value: 1, label: '1st'},
    {value: 2, label: '2nd'},
    {value: 3, label: '3rd'},
    {value: 4, label: '4th'},
Severity: Major
Found in src/app/lib/services/data.service.ts and 1 other location - About 2 days to fix
src/app/lib/fixture.spec.ts on lines 11..43

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

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

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

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

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

Refactorings

Further Reading

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

    if (cron[0] === '*' && cron[1] === '*' && cron[2] === '*' && cron[3] === '*' && cron[4] === '*') {
      frequency.baseFrequency = this.baseFrequency.minute; // every minute
    } else if (cron[1] === '*' && cron[2] === '*' && cron[3] === '*' && cron[4] === '*') {
      frequency.baseFrequency = this.baseFrequency.hour; // every hour
    } else if (cron[2] === '*' && cron[3] === '*' && cron[4] === '*') {
Severity: Major
Found in src/app/lib/services/posix.service.ts and 1 other location - About 1 day to fix
src/app/lib/services/quartz.service.ts on lines 35..47

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

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

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

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

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

Refactorings

Further Reading

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

    if (cron[1] === '*' && cron[2] === '*' && cron[3] === '*' && cron[4] === '*' && cron[5] === '?') {
      frequency.baseFrequency = this.baseFrequency.minute; // every minute
    } else if (cron[2] === '*' && cron[3] === '*' && cron[4] === '*' && cron[5] === '?') {
      frequency.baseFrequency = this.baseFrequency.hour; // every hour
    } else if (cron[3] === '*' && cron[4] === '*' && cron[5] === '?') {
Severity: Major
Found in src/app/lib/services/quartz.service.ts and 1 other location - About 1 day to fix
src/app/lib/services/posix.service.ts on lines 66..78

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

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

File cron-jobs.component.spec.ts has 444 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';

import { CronJobsComponent } from './cron-jobs.component';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import * as fixtures from '../fixture.spec';
Severity: Minor
Found in src/app/lib/cron-jobs/cron-jobs.component.spec.ts - About 6 hrs to fix

    File posix.service.spec.ts has 409 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { TestBed, inject } from '@angular/core/testing';
    
    import { PosixService } from './posix.service';
    import { DataService } from './data.service';
    import Spy = jasmine.Spy;
    Severity: Minor
    Found in src/app/lib/services/posix.service.spec.ts - About 5 hrs to fix

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

        private _months: Array<CronJobsSelectOption> = [
          {value: 1, label: 'January'},
          {value: 2, label: 'February'},
          {value: 3, label: 'March'},
          {value: 4, label: 'April'},
      Severity: Major
      Found in src/app/lib/services/data.service.ts and 1 other location - About 5 hrs to fix
      src/app/lib/fixture.spec.ts on lines 45..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 146.

      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

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

      export const months = [
        {value: 1, label: 'January'},
        {value: 2, label: 'February'},
        {value: 3, label: 'March'},
        {value: 4, label: 'April'},
      Severity: Major
      Found in src/app/lib/fixture.spec.ts and 1 other location - About 5 hrs to fix
      src/app/lib/services/data.service.ts on lines 71..84

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

      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('should return false if validation state equals to false on getIsInvalid call ' +
          'and no call getIsInvalid if validate.validate is false', fakeAsync(() => {
            testComponent.cronValidate = {
              validate: false
            };
      Severity: Major
      Found in src/app/lib/cron-jobs/cron-jobs.component.spec.ts and 1 other location - About 5 hrs to fix
      src/app/lib/cron-jobs/cron-jobs.component.spec.ts on lines 397..411

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

      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('should return false if validation state equals to false on getIsValid call ' +
          'and no call getValid if validate.validate is false', fakeAsync(() => {
            testComponent.cronValidate = {
              validate: false
            };
      Severity: Major
      Found in src/app/lib/cron-jobs/cron-jobs.component.spec.ts and 1 other location - About 5 hrs to fix
      src/app/lib/cron-jobs/cron-jobs.component.spec.ts on lines 413..427

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

      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

      File quartz.service.spec.ts has 375 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { TestBed, inject } from '@angular/core/testing';
      
      import { QuartzService } from './quartz.service';
      import { DataService } from './data.service';
      import * as fixture from '../fixture.spec';
      Severity: Minor
      Found in src/app/lib/services/quartz.service.spec.ts - About 5 hrs to fix

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

            it('should render correct selects on baseFrequency set to 5', fakeAsync(() => {
              tick();
              orgComponent.cronJobsForm.get('baseFrequency').setValue('5');
              fixture.detectChanges();
        
        
        Severity: Major
        Found in src/app/lib/cron-jobs/cron-jobs.component.spec.ts and 1 other location - About 4 hrs to fix
        src/app/lib/cron-jobs/cron-jobs.component.spec.ts on lines 530..540

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

        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('should render correct selects on baseFrequency set to 4', fakeAsync(() => {
              tick();
              orgComponent.cronJobsForm.get('baseFrequency').setValue('4');
              fixture.detectChanges();
        
        
        Severity: Major
        Found in src/app/lib/cron-jobs/cron-jobs.component.spec.ts and 1 other location - About 4 hrs to fix
        src/app/lib/cron-jobs/cron-jobs.component.spec.ts on lines 542..552

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

        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('should return default frequency on fromCron call with incorrect in length cron expression', () => {
              const expWrongOne = '* * 11 1';
              const expWrongTwo = '* * 11 1 1 3 4,12, 1 *';
              const expected = {
                baseFrequency: fixture.baseFrequency[0].value,
        Severity: Major
        Found in src/app/lib/services/posix.service.spec.ts and 1 other location - About 4 hrs to fix
        src/app/lib/services/quartz.service.spec.ts on lines 24..38

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

        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('should return default frequency on fromCron call with incorrect in length cron expression', () => {
              const expWrongOne = '0 * * * ?';
              const expWrongTwo = '0 * * * 1 2 3 ?';
              const expected = {
                baseFrequency: fixture.baseFrequency[0].value,
        Severity: Major
        Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 4 hrs to fix
        src/app/lib/services/posix.service.spec.ts on lines 68..82

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

        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 setCron has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
        Open

          setCron(value: CronJobsFrequency) {
            const cron = ['*', '*', '*', '*', '*'];
        
            if (value && value.baseFrequency) {
              if (value.baseFrequency >= this.baseFrequency.hour) {
        Severity: Minor
        Found in src/app/lib/services/posix.service.ts - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function setCron has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
        Open

          setCron(newValue: CronJobsFrequency) {
            const cron = ['0', '*', '*', '*', '*', '?'];
        
            if (newValue && newValue.baseFrequency) {
              if (newValue.baseFrequency >= this.baseFrequency.hour) {
        Severity: Minor
        Found in src/app/lib/services/quartz.service.ts - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

          it('should return if validation state on getIsValid call and call getValid if validate.validate is set to true', fakeAsync(() => {
            testFixture.detectChanges();
            const spy = spyOn(component, 'getValid').and.callThrough();
        
            tick();
        Severity: Major
        Found in src/app/lib/cron-jobs/cron-jobs.component.spec.ts and 1 other location - About 3 hrs to fix
        src/app/lib/cron-jobs/cron-jobs.component.spec.ts on lines 385..395

        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

          it('should return if validation state on getIsInvalid call and call getValid if validate.validate is set to true', fakeAsync(() => {
            testFixture.detectChanges();
            const spy = spyOn(component, 'getValid').and.callThrough();
        
            tick();
        Severity: Major
        Found in src/app/lib/cron-jobs/cron-jobs.component.spec.ts and 1 other location - About 3 hrs to fix
        src/app/lib/cron-jobs/cron-jobs.component.spec.ts on lines 373..383

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

          private daysOfWeekQuartz: Array<CronJobsSelectOption> = [
            {value: 1, label: 'Sunday'},
            {value: 2, label: 'Monday'},
            {value: 3, label: 'Tuesday'},
            {value: 4, label: 'Wednesday'},
        Severity: Major
        Found in src/app/lib/services/data.service.ts and 2 other locations - About 3 hrs to fix
        src/app/lib/services/data.service.ts on lines 17..25
        src/app/lib/services/data.service.ts on lines 86..94

        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