department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,846 of 12,846 total issues

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

    vaRegionalOfficeChapter: {
      title: 'VA regional office',
      pages: {
        associatedVARegionalOfficePage: {
          path: 'associated-va-regional-office',
Severity: Major
Found in src/applications/simple-forms/20-10206/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10206/config/form.js on lines 104..115
src/applications/simple-forms/20-10206/config/form.js on lines 141..152
src/applications/simple-forms/20-10206/config/form.js on lines 153..164
src/applications/simple-forms/20-10206/config/form.js on lines 165..176
src/applications/simple-forms/20-10206/config/form.js on lines 263..274

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

        financialHardshipPage: {
          depends: formData => formData.otherReasons?.FINANCIAL_HARDSHIP,
          path: 'evidence-financial-hardship',
          title: 'Upload evidence for extreme financial hardship',
          uiSchema: financialHardshipPg.uiSchema,
Severity: Major
Found in src/applications/simple-forms/20-10207/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10207/config/form.js on lines 486..493
src/applications/simple-forms/20-10207/config/form.js on lines 494..502
src/applications/simple-forms/20-10207/config/form.js on lines 503..511
src/applications/simple-forms/20-10207/config/form.js on lines 532..539
src/applications/simple-forms/20-10207/config/form.js on lines 540..548

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

    additionalInformationChapter: {
      title: 'Additional information',
      pages: {
        additionalRecordsInformationPage: {
          path: 'additional-records-information',
Severity: Major
Found in src/applications/simple-forms/20-10206/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10206/config/form.js on lines 104..115
src/applications/simple-forms/20-10206/config/form.js on lines 141..152
src/applications/simple-forms/20-10206/config/form.js on lines 153..164
src/applications/simple-forms/20-10206/config/form.js on lines 165..176
src/applications/simple-forms/20-10206/config/form.js on lines 275..286

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

        terminalIllnessPage: {
          depends: formData => formData.otherReasons?.TERMINAL_ILLNESS,
          path: 'evidence-terminal-illness',
          title: 'Upload evidence for terminal illness',
          uiSchema: terminalIllnessPg.uiSchema,
Severity: Major
Found in src/applications/simple-forms/20-10207/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10207/config/form.js on lines 478..485
src/applications/simple-forms/20-10207/config/form.js on lines 494..502
src/applications/simple-forms/20-10207/config/form.js on lines 503..511
src/applications/simple-forms/20-10207/config/form.js on lines 532..539
src/applications/simple-forms/20-10207/config/form.js on lines 540..548

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

  gulfWar2001Locations: {
    title: gulfWar2001PageTitle,
    path: `${TE_URL_PREFIX}/gulf-war-2001`,
    depends: formData => isClaimingTECondition(formData),
    uiSchema: gulfWar2001Locations.uiSchema,
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 34..40
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 41..47
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 71..77
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 101..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

  herbicideLocations: {
    title: herbicidePageTitle,
    path: `${TE_URL_PREFIX}/herbicide`,
    depends: formData => isClaimingTECondition(formData),
    uiSchema: herbicideLocations.uiSchema,
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 34..40
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 41..47
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 56..62
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 101..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

  additionalExposures: {
    title: additionalExposuresPageTitle,
    path: `${TE_URL_PREFIX}/additional-exposures`,
    depends: formData => isClaimingTECondition(formData),
    uiSchema: additionalExposures.uiSchema,
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 34..40
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 41..47
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 56..62
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 71..77

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

  gulfWar1990Locations: {
    title: gulfWar1990PageTitle,
    path: `${TE_URL_PREFIX}/gulf-war-1990`,
    depends: formData => isClaimingTECondition(formData),
    uiSchema: gulfWar1990Locations.uiSchema,
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 34..40
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 56..62
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 71..77
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 101..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

            <va-process-list-item header="Apply">
              <div>
                <p>Complete this burial benefits form.</p>
                <p>
                  After submitting the form, you’ll get a confirmation message.
src/applications/claims-status/components/StemDeniedDetails.jsx on lines 79..93
src/applications/disability-benefits/all-claims/content/unemployabilityFormIntro.jsx on lines 23..36
src/applications/disability-benefits/all-claims/content/unemployabilityFormIntro.jsx on lines 37..49
src/applications/ivc-champva/10-7959f-1/containers/IntroductionPage.jsx on lines 34..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

      <div className="process schemaform-process">
        <ul>
          <li>
            You’ll need your Social Security number or your VA file number.
          </li>
src/applications/burial-poc-v6/pages/BurialIntroduction.jsx on lines 74..82
src/applications/claims-status/components/StemDeniedDetails.jsx on lines 79..93
src/applications/disability-benefits/all-claims/content/unemployabilityFormIntro.jsx on lines 23..36
src/applications/disability-benefits/all-claims/content/unemployabilityFormIntro.jsx on lines 37..49

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

  toxicExposureConditions: {
    title: conditionsPageTitle,
    path: `${TE_URL_PREFIX}/conditions`,
    depends: formData => showToxicExposurePages(formData),
    uiSchema: toxicExposureConditions.uiSchema,
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 41..47
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 56..62
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 71..77
src/applications/disability-benefits/all-claims/pages/toxicExposure/toxicExposurePages.js on lines 101..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

        <li className="process-step list-one">
          <div>
            <h3>Answer questions</h3>
            <p>
              First, we’ll ask you questions about your situation and how your
src/applications/burial-poc-v6/pages/BurialIntroduction.jsx on lines 74..82
src/applications/claims-status/components/StemDeniedDetails.jsx on lines 79..93
src/applications/disability-benefits/all-claims/content/unemployabilityFormIntro.jsx on lines 37..49
src/applications/ivc-champva/10-7959f-1/containers/IntroductionPage.jsx on lines 34..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

        <li className="process-step list-two">
          <div>
            <h3>Send former employers a request for information form</h3>
            <p>
              Then, we’ll ask you to send each of your former employers a form
src/applications/burial-poc-v6/pages/BurialIntroduction.jsx on lines 74..82
src/applications/claims-status/components/StemDeniedDetails.jsx on lines 79..93
src/applications/disability-benefits/all-claims/content/unemployabilityFormIntro.jsx on lines 23..36
src/applications/ivc-champva/10-7959f-1/containers/IntroductionPage.jsx on lines 34..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

              <li className="stem-ad-list-item">
                You meet the degree requirements because you answered "Yes" to
                one of these questions on the Rogers STEM Scholarship
                application.
                <ul>
src/applications/burial-poc-v6/pages/BurialIntroduction.jsx on lines 74..82
src/applications/disability-benefits/all-claims/content/unemployabilityFormIntro.jsx on lines 23..36
src/applications/disability-benefits/all-claims/content/unemployabilityFormIntro.jsx on lines 37..49
src/applications/ivc-champva/10-7959f-1/containers/IntroductionPage.jsx on lines 34..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

    {
      id: '-2',
      type: 'folders',
      attributes: {
        folderId: -2,
src/applications/personalization/dashboard/mocks/messaging/index.js on lines 130..143
src/platform/mhv/api/mocks/secure-messaging/folders/index.js on lines 17..30
src/platform/mhv/api/mocks/secure-messaging/folders/index.js 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 56.

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

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

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

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

Refactorings

Further Reading

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

const createMockFailedResponse = (errorCode = 400) => {
  return {
    errors: [
      {
        title: 'Operation failed',
src/applications/check-in/api/local-mock-api/mocks/v2/sessions/post.js on lines 11..22

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

        choosePrimaryPhone: {
          title: 'Primary phone number',
          path: 'primary-phone-number',
          // only visible if both the home & mobile phone are populated
          depends: hasHomeAndMobilePhone,
Severity: Major
Found in src/applications/appeals/testing/sc/config/form.js and 1 other location - About 1 hr to fix
src/applications/appeals/995/config/form.js on lines 152..162

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

export function validateCurrency(errors, fieldData) {
  const CURRENCY_FORMAT_REGEX = /(?=.*?\d)^\$?(([1-9]\d{0,2}(,\d{3})*)|\d+)?(\.\d{1,2})?$/;
  if (!CURRENCY_FORMAT_REGEX.test(fieldData)) {
    errors.addError(content['validation-currency-format']);
  }
src/applications/ezr/utils/validation.js on lines 18..23

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

  const handleBackNavigation = () => {
    if (reviewNavigation && showReviewNavigation) {
      setFormData({
        ...data,
        reviewNavigation: false,
src/applications/financial-status-report/components/resolution/ResolutionExplainerWidget.jsx on lines 21..31

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

    bestTimetoCall: Object.entries(data.bestTimeToCall)
      .filter(item => item[1])
      .map(item => titleCase(item[0])),
src/applications/vaos/new-appointment/redux/helpers/formSubmitTransformers.js on lines 95..97

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language