18F/web-design-standards

View on GitHub

Showing 301 of 368 total issues

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

AriaDisabled.argTypes = {
  disabled_state: {
    defaultValue: "aria-disabled",
  },
  defaultDateStart: {
packages/usa-date-picker/src/usa-date-picker.stories.js on lines 83..99
packages/usa-date-picker/src/usa-date-picker.stories.js on lines 102..118
packages/usa-date-range-picker/src/date-range-picker.stories.js on lines 67..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 91.

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

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

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

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

Refactorings

Further Reading

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

AriaDisabled.argTypes = {
  disabled_state: {
    defaultValue: "aria-disabled",
  },
  defaultDate: {
Severity: Major
Found in packages/usa-date-picker/src/usa-date-picker.stories.js and 3 other locations - About 2 hrs to fix
packages/usa-date-picker/src/usa-date-picker.stories.js on lines 83..99
packages/usa-date-range-picker/src/date-range-picker.stories.js on lines 67..83
packages/usa-date-range-picker/src/date-range-picker.stories.js on lines 86..102

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

Disabled.argTypes = {
  disabled_state: {
    defaultValue: "disabled",
  },
  defaultDateStart: {
packages/usa-date-picker/src/usa-date-picker.stories.js on lines 83..99
packages/usa-date-picker/src/usa-date-picker.stories.js on lines 102..118
packages/usa-date-range-picker/src/date-range-picker.stories.js on lines 86..102

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

Disabled.argTypes = {
  disabled_state: {
    defaultValue: "disabled",
  },
  defaultDate: {
Severity: Major
Found in packages/usa-date-picker/src/usa-date-picker.stories.js and 3 other locations - About 2 hrs to fix
packages/usa-date-picker/src/usa-date-picker.stories.js on lines 102..118
packages/usa-date-range-picker/src/date-range-picker.stories.js on lines 67..83
packages/usa-date-range-picker/src/date-range-picker.stories.js on lines 86..102

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

    it("should allow keyboard navigation to move forward one month to a date that is the maximum date", () => {
      input.value = "05/20/2021";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move forward one month to a date that is after the maximum date but cap at maximum date", () => {
      input.value = "05/21/2021";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move forward one year to a date that is after the maximum date but cap at maximum date", () => {
      input.value = "06/21/2020";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872

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

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

    it("should allow keyboard navigation to move back one year to a date that is before the minimum date but cap at minimum date", () => {
      input.value = "05/21/2021";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move forward one week to a date that is after the maximum date but cap at maximum date", () => {
      input.value = "06/14/2021";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move back one month to a date that is the minimum date", () => {
      input.value = "06/22/2020";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move back one month to a date that is before the minimum date but cap at minimum date", () => {
      input.value = "06/21/2020";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move forward one day to a date that is the maximum date", () => {
      input.value = "06/19/2021";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move back one week to a date that is the minimum date", () => {
      input.value = "05/29/2020";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move back one year to a date that is the minimum date", () => {
      input.value = "05/22/2021";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should not allow keyboard navigation to move back one day to a date that is before the minimum date", () => {
      input.value = "05/22/2020";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move back one week to a date that is before the minimum date but cap at minimum date", () => {
      input.value = "05/28/2020";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move back one day to a date that is the minimum date", () => {
      input.value = "05/23/2020";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move forward one year to a date that is the maximum date", () => {
      input.value = "06/20/2020";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should allow keyboard navigation to move forward one week to a date that is the maximum date", () => {
      input.value = "06/13/2021";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 797..814
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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

    it("should not allow keyboard navigation to move forward one day to a date that is after the maximum date", () => {
      input.value = "06/20/2021";
      EVENTS.click(button);
      assert.strictEqual(
        getCalendarEl().hidden,
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 550..567
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 569..586
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 588..605
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 607..624
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 626..643
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 645..662
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 664..681
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 683..700
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 702..719
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 721..738
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 740..757
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 759..776
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 778..795
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 836..853
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 855..872
packages/usa-date-picker/src/test/date-picker-min-date-max-date.spec.js on lines 874..891

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

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