department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,675 of 12,675 total issues

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

const ownedAssetRecipientPage = {
  uiSchema: {
    ...arrayBuilderItemFirstPageTitleUI({
      title: 'Income and net worth associated with owned assets',
      nounSingular: options.nounSingular,
src/applications/income-and-asset-statement/config/chapters/03-unassociated-incomes/unassociatedIncomePages.js on lines 114..160
src/applications/income-and-asset-statement/config/chapters/04-associated-incomes/associatedIncomePages.js on lines 115..161
src/applications/income-and-asset-statement/config/chapters/06-royalties-and-other-properties/royaltiesAndOtherPropertyPages.js on lines 123..170

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

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

const incomeRecipientPage = {
  uiSchema: {
    ...arrayBuilderItemFirstPageTitleUI({
      title: 'Income and net worth associated with financial accounts',
      nounSingular: options.nounSingular,
src/applications/income-and-asset-statement/config/chapters/03-unassociated-incomes/unassociatedIncomePages.js on lines 114..160
src/applications/income-and-asset-statement/config/chapters/05-owned-assets/ownedAssetPages.js on lines 118..164
src/applications/income-and-asset-statement/config/chapters/06-royalties-and-other-properties/royaltiesAndOtherPropertyPages.js on lines 123..170

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

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

const incomeRecipientPage = {
  uiSchema: {
    ...arrayBuilderItemFirstPageTitleUI({
      title: 'Recurring income not associated with accounts or assets',
      nounSingular: options.nounSingular,
src/applications/income-and-asset-statement/config/chapters/04-associated-incomes/associatedIncomePages.js on lines 115..161
src/applications/income-and-asset-statement/config/chapters/05-owned-assets/ownedAssetPages.js on lines 118..164
src/applications/income-and-asset-statement/config/chapters/06-royalties-and-other-properties/royaltiesAndOtherPropertyPages.js on lines 123..170

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

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 VAFacilityPageV2 has 228 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function VAFacilityPageV2() {
  const pageTitle = useSelector(state => getPageTitle(state, pageKey));

  const history = useHistory();
  const dispatch = useDispatch();

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

    function baseSet(arrayPath, value, object, level = 0) {
      if (level >= arrayPath.length) {
        // We're at the end of our path; time to assign
        return value;
      }
    Severity: Major
    Found in src/platform/forms-system/src/js/utilities/data/set.js and 1 other location - About 1 day to fix
    src/platform/utilities/data/set.js on lines 20..61

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

    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

    function baseSet(arrayPath, value, object, level = 0) {
      if (level >= arrayPath.length) {
        // We're at the end of our path; time to assign
        return value;
      }
    Severity: Major
    Found in src/platform/utilities/data/set.js and 1 other location - About 1 day to fix
    src/platform/forms-system/src/js/utilities/data/set.js on lines 20..61

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

    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

        return (
          <Form
            safeRenderCompletion={safeRenderCompletion}
            FieldTemplate={useReviewMode ? ReviewFieldTemplate : FieldTemplate}
            formContext={this.state.formContext}
    Severity: Major
    Found in src/platform/forms-system/src/js/components/SchemaForm.jsx and 1 other location - About 1 day to fix
    src/applications/_mock-form-ae-design-patterns/patterns/pattern1/TaskPurple/SchemaForm.jsx on lines 217..241

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

    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

    export const uiSchema = {
      veteranMarriageHistory: {
        items: {
          'ui:title': FormerSpouseHeader,
          startLocation: {
    src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-spouse-marriage-history-details/currentSpouseMarriageHistoryDetailsPartFour.js on lines 24..66

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 217.

    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

    export const uiSchema = {
      spouseMarriageHistory: {
        items: {
          'ui:title': FormerSpouseHeader,
          startLocation: {
    src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/veteran-marriage-history-details/veteranMarriageHistoryDetailsPartFour.js on lines 24..66

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 217.

    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

        return (
          <Form
            safeRenderCompletion={safeRenderCompletion}
            FieldTemplate={useReviewMode ? ReviewFieldTemplate : FieldTemplate}
            formContext={this.state.formContext}
    src/platform/forms-system/src/js/components/SchemaForm.jsx on lines 201..225

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

    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 formFlowHelper.js has 545 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import _ from 'lodash';
    import {
      CategoryEducation,
      CHAPTER_2,
      CHAPTER_3,
    Severity: Major
    Found in src/applications/ask-va/config/schema-helpers/formFlowHelper.js - About 1 day to fix

      File actions.js has 544 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable no-prototype-builtins */
      import moment from 'moment';
      import * as Sentry from '@sentry/browser';
      import { recordEvent } from '@department-of-veterans-affairs/platform-monitoring/exports';
      import {
      Severity: Major
      Found in src/applications/vaos/appointment-list/redux/actions.js - About 1 day to fix

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

        export function validateAgentOrangeExposureDates(
          errors,
          { agentOrangeStartDate, agentOrangeEndDate },
        ) {
          const fromDate = convertToDateField(agentOrangeStartDate);
        Severity: Major
        Found in src/applications/ezr/utils/validation.js and 5 other locations - About 1 day to fix
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 60..83
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 85..108
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 110..133
        src/applications/ezr/utils/validation.js on lines 60..83
        src/applications/ezr/utils/validation.js on lines 110..133

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

        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

        export function validateExposureDates(
          errors,
          { toxicExposureStartDate, toxicExposureEndDate },
        ) {
          const fromDate = convertToDateField(toxicExposureStartDate);
        Severity: Major
        Found in src/applications/ezr/utils/validation.js and 5 other locations - About 1 day to fix
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 60..83
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 85..108
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 110..133
        src/applications/ezr/utils/validation.js on lines 60..83
        src/applications/ezr/utils/validation.js on lines 85..108

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

        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

        export function validateGulfWarDates(
          errors,
          { gulfWarStartDate, gulfWarEndDate },
        ) {
          const fromDate = convertToDateField(gulfWarStartDate);
        Severity: Major
        Found in src/applications/ezr/utils/validation.js and 5 other locations - About 1 day to fix
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 60..83
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 85..108
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 110..133
        src/applications/ezr/utils/validation.js on lines 85..108
        src/applications/ezr/utils/validation.js on lines 110..133

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

        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

        export function validateAgentOrangeExposureDates(
          errors,
          { agentOrangeStartDate, agentOrangeEndDate },
        ) {
          const fromDate = convertToDateField(agentOrangeStartDate);
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 60..83
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 110..133
        src/applications/ezr/utils/validation.js on lines 60..83
        src/applications/ezr/utils/validation.js on lines 85..108
        src/applications/ezr/utils/validation.js on lines 110..133

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

        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

        export function validateExposureDates(
          errors,
          { toxicExposureStartDate, toxicExposureEndDate },
        ) {
          const fromDate = convertToDateField(toxicExposureStartDate);
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 60..83
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 85..108
        src/applications/ezr/utils/validation.js on lines 60..83
        src/applications/ezr/utils/validation.js on lines 85..108
        src/applications/ezr/utils/validation.js on lines 110..133

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

        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

        export function validateGulfWarDates(
          errors,
          { gulfWarStartDate, gulfWarEndDate },
        ) {
          const fromDate = convertToDateField(gulfWarStartDate);
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 85..108
        src/applications/_mock-form-ae-design-patterns/utils/validation.js on lines 110..133
        src/applications/ezr/utils/validation.js on lines 60..83
        src/applications/ezr/utils/validation.js on lines 85..108
        src/applications/ezr/utils/validation.js on lines 110..133

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

        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 (yellowRibbonPrograms.length > 0) {
                yellowRibbonPrograms = yellowRibbonPrograms.map((program, index) => ({
                  ...program,
                  index,
                }));
        Severity: Major
        Found in src/applications/gi/reducers/calculator.js and 1 other location - About 1 day to fix
        src/applications/gi/selectors/compare.js on lines 27..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 216.

        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

          render() {
            const pageDescription = (
              <>
                <h3 className="vads-u-font-size--h4">Shipping address</h3>
                <div className="vads-u-margin-top--2">
        src/applications/health-care-supply-reordering/components/ReviewCardField.jsx on lines 570..600

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

        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