department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,920 of 12,920 total issues

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

      <ul>
        <li>
          Military personnel records, such as a determination from the DOD{' '}
          <strong>and</strong>
        </li>
src/applications/claims-status/components/StemDeniedDetails.jsx on lines 96..105
src/applications/coronavirus-screener/config/questions.jsx on lines 185..191
src/applications/enrollment-verification/containers/EnrollmentVerificationIntroPage.jsx on lines 127..133
src/applications/mhv-medications/components/shared/StatusDropdown.jsx on lines 139..145
src/applications/pensions/config/chapters/06-additional-information/supportingDocuments.js on lines 185..196
src/applications/post-911-gib-status/utils/helpers.jsx on lines 72..78
src/applications/simple-forms/21-0966/containers/IntroductionPage.jsx on lines 37..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

                <ol>
                  <li>
                    Be enrolled in an eligible STEM undergraduate degree,{' '}
                    <strong>or</strong>
                  </li>
src/applications/coronavirus-screener/config/questions.jsx on lines 185..191
src/applications/enrollment-verification/containers/EnrollmentVerificationIntroPage.jsx on lines 127..133
src/applications/mhv-medications/components/shared/StatusDropdown.jsx on lines 139..145
src/applications/pensions/config/chapters/06-additional-information/supportingDocuments.js on lines 185..196
src/applications/post-911-gib-status/utils/helpers.jsx on lines 72..78
src/applications/simple-forms/20-10207/containers/IntroductionPage.jsx on lines 125..131
src/applications/simple-forms/21-0966/containers/IntroductionPage.jsx on lines 37..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    previousEmploymentHistorySummary: pageBuilder.summaryPage({
      title: 'Previous employment',
      path: 'employment/previous/summary',
      depends: formData => showPreviousEmploymentHistoryPages(formData),
      uiSchema: summaryPage.uiSchema,
src/applications/pensions/config/chapters/03-health-and-employment-information/currentEmploymentHistoryPages.js on lines 82..88
src/applications/pensions/config/chapters/03-health-and-employment-information/currentEmploymentHistoryPages.js on lines 89..95
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 109..115
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 123..129

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    currentEmploymentHistorySummary: pageBuilder.summaryPage({
      title: 'Current employment',
      path: 'employment/current/summary',
      depends: formData => showCurrentEmploymentHistoryPages(formData),
      uiSchema: summaryPage.uiSchema,
src/applications/pensions/config/chapters/03-health-and-employment-information/currentEmploymentHistoryPages.js on lines 89..95
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 109..115
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 116..122
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 123..129

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    currentEmploymentHistoryPage: pageBuilder.itemPage({
      title: 'List of current employment',
      path: 'employment/current/:index/job',
      depends: formData => showCurrentEmploymentHistoryPages(formData),
      uiSchema: currentEmploymentHistoryPage.uiSchema,
src/applications/pensions/config/chapters/03-health-and-employment-information/currentEmploymentHistoryPages.js on lines 82..88
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 109..115
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 116..122
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 123..129

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    previousEmploymentHistoryIntro: pageBuilder.introPage({
      title: 'Previous employment',
      path: 'employment/previous/intro',
      depends: formData => showPreviousEmploymentHistoryPages(formData),
      uiSchema: introPage.uiSchema,
src/applications/pensions/config/chapters/03-health-and-employment-information/currentEmploymentHistoryPages.js on lines 82..88
src/applications/pensions/config/chapters/03-health-and-employment-information/currentEmploymentHistoryPages.js on lines 89..95
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 116..122
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 123..129

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    previousEmploymentHistoryPage: pageBuilder.itemPage({
      title: 'List of previous employment',
      path: 'employment/previous/:index/job',
      depends: formData => showPreviousEmploymentHistoryPages(formData),
      uiSchema: previousEmploymentHistoryPage.uiSchema,
src/applications/pensions/config/chapters/03-health-and-employment-information/currentEmploymentHistoryPages.js on lines 82..88
src/applications/pensions/config/chapters/03-health-and-employment-information/currentEmploymentHistoryPages.js on lines 89..95
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 109..115
src/applications/pensions/config/chapters/03-health-and-employment-information/previousEmploymentHistoryPages.js on lines 116..122

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export const customSubmit686 = (form, formConfig) => {
  const body = customTransformForSubmit(formConfig, form);

  return submitToUrl(
    body,
src/applications/disability-benefits/686c-674/analytics/helpers.js on lines 25..34

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export default profileContactInfo({
  content: getContent('appeal'),
  addressKey: 'address',
  // Override defaults because of addressKey change
  included: allContacts,
src/applications/appeals/995/pages/contactInformation.js on lines 8..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

      case 'army':
        return (
          <p className="va-address-block">
            Army Review Boards Agency
            <br />
Severity: Major
Found in src/applications/discharge-wizard/helpers/index.jsx and 3 other locations - About 1 hr to fix
src/applications/discharge-wizard/helpers/index.jsx on lines 109..121
src/applications/discharge-wizard/helpers/index.jsx on lines 154..166
src/applications/discharge-wizard/helpers/index.jsx on lines 178..190

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

    apiRequest(resource)
      .then(responseData => {
        setData(responseData);
        setLoading(false);
      })
Severity: Major
Found in src/applications/pensions/components/NoFormPage.jsx and 1 other location - About 1 hr to fix
src/applications/burials-ez/components/NoFormPage.jsx on lines 297..304

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

  const cernerFacilitiesNames = useMemo(
    () => {
      if (ehrDataByVhaId) {
        return cernerFacilities?.map(facility =>
          getVamcSystemNameFromVhaId(ehrDataByVhaId, facility.facilityId),
src/applications/mhv-secure-messaging/components/MessageList/CernerFacilityAlert.jsx on lines 12..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 55.

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

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

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

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

Refactorings

Further Reading

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

        militaryDetailsPreparer: {
          path: 'military-details-preparer',
          title: 'Military details',
          depends: formData =>
            isVeteran(formData) && isAuthorizedAgent(formData),
Severity: Major
Found in src/applications/pre-need-integration/config/form.jsx and 3 other locations - About 1 hr to fix
src/applications/disability-benefits/all-claims/config/form.js on lines 673..681
src/applications/pre-need-integration/config/form.jsx on lines 476..483
src/applications/pre-need-integration/config/form.jsx on lines 511..518

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

        applicantMilitaryHistoryPreparer: {
          title: "Applicant's service period(s)",
          path: 'applicant-military-history-preparer',
          depends: formData =>
            isVeteran(formData) && isAuthorizedAgent(formData),
Severity: Major
Found in src/applications/pre-need-integration/config/form.jsx and 3 other locations - About 1 hr to fix
src/applications/disability-benefits/all-claims/config/form.js on lines 673..681
src/applications/pre-need-integration/config/form.jsx on lines 457..464
src/applications/pre-need-integration/config/form.jsx on lines 511..518

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

        <div className="omb-info--container">
          <va-omb-info
            res-burden={20}
            omb-number="2900-0784"
            exp-date="03/31/2026"
src/applications/pre-need/components/IntroductionPage.jsx on lines 140..148

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

      case 'coastGuard':
        return (
          <p className="va-address-block">
            DHS Office of the General Counsel
            <br />
Severity: Major
Found in src/applications/discharge-wizard/helpers/index.jsx and 3 other locations - About 1 hr to fix
src/applications/discharge-wizard/helpers/index.jsx on lines 96..108
src/applications/discharge-wizard/helpers/index.jsx on lines 109..121
src/applications/discharge-wizard/helpers/index.jsx on lines 154..166

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

const capitalizeWord = word => {
  const capFirstLetter = word[0].toUpperCase();
  return `${capFirstLetter}${word.slice(1)}`;
};
Severity: Major
Found in src/applications/claims-status/containers/AppealInfo.jsx and 3 other locations - About 1 hr to fix
src/applications/claims-status/components/appeals-v2/AppealListItem.jsx on lines 14..17
src/applications/personalization/dashboard/components/claims-and-appeals/Appeal.jsx on lines 17..20
src/applications/personalization/dashboard/components/claims-and-appeals/Claim.jsx on lines 15..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

const capitalizeWord = word => {
  const capFirstLetter = word[0].toUpperCase();
  return `${capFirstLetter}${word.slice(1)}`;
};
src/applications/claims-status/containers/AppealInfo.jsx on lines 31..34
src/applications/personalization/dashboard/components/claims-and-appeals/Appeal.jsx on lines 17..20
src/applications/personalization/dashboard/components/claims-and-appeals/Claim.jsx on lines 15..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

      case 'airForce':
        return (
          <p className="va-address-block">
            Air Force Discharge Review Board
            <br />
Severity: Major
Found in src/applications/discharge-wizard/helpers/index.jsx and 3 other locations - About 1 hr to fix
src/applications/discharge-wizard/helpers/index.jsx on lines 96..108
src/applications/discharge-wizard/helpers/index.jsx on lines 154..166
src/applications/discharge-wizard/helpers/index.jsx on lines 178..190

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

export const HealthInsuranceDescription = () => (
  <>
    <p className="vads-u-margin-top--2">
      Health insurance includes any coverage that you get through a spouse or
      significant other. Health insurance also includes Medicare, private
src/applications/ezr/components/FormDescriptions/HealthInsuranceDescriptions.jsx on lines 3..15

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language