department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,841 of 12,841 total issues

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

    <ul>
      <li>
        Enrolled in VA health care, <strong>and</strong>
      </li>
      <li>
src/applications/combined-debt-portal/debt-letters/components/NeedHelp.jsx on lines 17..26
src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx on lines 34..46
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 34..42
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 49..57
src/applications/ivc-champva/10-7959C/chapters/medicareInformation.js on lines 228..236
src/applications/pensions/components/FormAlerts/index.jsx on lines 61..70
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/UnauthContent/index.js on lines 49..58
src/applications/veteran-id-card/containers/Main.jsx on lines 107..120

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

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

      <ul>
        <li>
          An extended monthly payment plan, <strong>or</strong>
        </li>
        <li>
src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx on lines 34..46
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 34..42
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 49..57
src/applications/ivc-champva/10-7959C/chapters/medicareInformation.js on lines 228..236
src/applications/pensions/components/FormAlerts/index.jsx on lines 61..70
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js on lines 78..87
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/UnauthContent/index.js on lines 49..58
src/applications/veteran-id-card/containers/Main.jsx on lines 107..120

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

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

    <ul>
      <li>
        Divorce decree, <b>or</b>
      </li>
      <li>
src/applications/combined-debt-portal/debt-letters/components/NeedHelp.jsx on lines 17..26
src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx on lines 34..46
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 34..42
src/applications/ivc-champva/10-7959C/chapters/medicareInformation.js on lines 228..236
src/applications/pensions/components/FormAlerts/index.jsx on lines 61..70
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js on lines 78..87
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/UnauthContent/index.js on lines 49..58
src/applications/veteran-id-card/containers/Main.jsx on lines 107..120

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

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

          <ul>
            <li>
              You served in the active military, naval, or air service
              (including being called up from the National Guard or Reserve by a
              federal order), <strong>and</strong>
src/applications/combined-debt-portal/debt-letters/components/NeedHelp.jsx on lines 17..26
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 34..42
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 49..57
src/applications/ivc-champva/10-7959C/chapters/medicareInformation.js on lines 228..236
src/applications/pensions/components/FormAlerts/index.jsx on lines 61..70
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js on lines 78..87
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/UnauthContent/index.js on lines 49..58
src/applications/veteran-id-card/containers/Main.jsx on lines 107..120

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

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

      <ul>
        <li>
          They’re under 18 years old, <strong>or</strong>
        </li>
        <li>
Severity: Major
Found in src/applications/pensions/components/FormAlerts/index.jsx and 8 other locations - About 2 hrs to fix
src/applications/combined-debt-portal/debt-letters/components/NeedHelp.jsx on lines 17..26
src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx on lines 34..46
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 34..42
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 49..57
src/applications/ivc-champva/10-7959C/chapters/medicareInformation.js on lines 228..236
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js on lines 78..87
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/UnauthContent/index.js on lines 49..58
src/applications/veteran-id-card/containers/Main.jsx on lines 107..120

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

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

            <ul>
              <li>
                Medicare Parts A and B card, <b>or</b>
              </li>
              <li>
src/applications/combined-debt-portal/debt-letters/components/NeedHelp.jsx on lines 17..26
src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx on lines 34..46
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 34..42
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 49..57
src/applications/pensions/components/FormAlerts/index.jsx on lines 61..70
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js on lines 78..87
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/UnauthContent/index.js on lines 49..58
src/applications/veteran-id-card/containers/Main.jsx on lines 107..120

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

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

    <ul>
      <li>
        Marriage certificate, <b>or</b>
      </li>
      <li>
src/applications/combined-debt-portal/debt-letters/components/NeedHelp.jsx on lines 17..26
src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx on lines 34..46
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 49..57
src/applications/ivc-champva/10-7959C/chapters/medicareInformation.js on lines 228..236
src/applications/pensions/components/FormAlerts/index.jsx on lines 61..70
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js on lines 78..87
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/UnauthContent/index.js on lines 49..58
src/applications/veteran-id-card/containers/Main.jsx on lines 107..120

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

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

    <ul>
      <li>
        Enrolled in VA health care, <strong>and</strong>
      </li>
      <li>
src/applications/combined-debt-portal/debt-letters/components/NeedHelp.jsx on lines 17..26
src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx on lines 34..46
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 34..42
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 49..57
src/applications/ivc-champva/10-7959C/chapters/medicareInformation.js on lines 228..236
src/applications/pensions/components/FormAlerts/index.jsx on lines 61..70
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js on lines 78..87
src/applications/veteran-id-card/containers/Main.jsx on lines 107..120

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

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

          <ul>
            <li>
              Veterans Health Identification Card (VHIC), <b>or</b>
            </li>
            <li>
Severity: Major
Found in src/applications/veteran-id-card/containers/Main.jsx and 8 other locations - About 2 hrs to fix
src/applications/combined-debt-portal/debt-letters/components/NeedHelp.jsx on lines 17..26
src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx on lines 34..46
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 34..42
src/applications/ivc-champva/10-10D/components/Applicant/applicantFileUpload.js on lines 49..57
src/applications/ivc-champva/10-7959C/chapters/medicareInformation.js on lines 228..236
src/applications/pensions/components/FormAlerts/index.jsx on lines 61..70
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/AuthContent/index.js on lines 78..87
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/UnauthContent/index.js on lines 49..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 77.

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

  'PUT /v0/profile/telephones': (req, res) => {
    if (req?.body?.phoneNumber === '1111111') {
      return res.json(phoneNumber.transactions.receivedNoChangesDetected);
    }
    return res.status(200).json(phoneNumber.transactions.received);
Severity: Major
Found in src/applications/representative-appoint/mocks/server.js and 1 other location - About 2 hrs to fix
src/applications/personalization/profile/mocks/server.js on lines 236..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 77.

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

                <li>
                  Non-VA medications include these types:
                  <ul>
                    <li>Prescriptions you filled through a non-VA pharmacy</li>
                    <li>
src/applications/dhp-connected-devices/components/TermsAndConditions.jsx on lines 6..27
src/applications/gi/components/content/modals/SizeOfInstitutionsModalContent.jsx on lines 22..33
src/applications/static-pages/ezr-submission-options/components/Descriptions/index.jsx on lines 67..81

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

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

  'PUT /v0/profile/telephones': (req, res) => {
    if (req?.body?.phoneNumber === '1111111') {
      return res.json(phoneNumber.transactions.receivedNoChangesDetected);
    }
    return res.status(200).json(phoneNumber.transactions.received);
Severity: Major
Found in src/applications/personalization/profile/mocks/server.js and 1 other location - About 2 hrs to fix
src/applications/representative-appoint/mocks/server.js on lines 127..132

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

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

export const schema = {
  type: 'object',
  properties: {
    application: {
      type: 'object',
src/applications/pre-need-integration/config/pages/nonVeteranApplicantDetailsPreparer.jsx on lines 35..49
src/applications/pre-need/config/pages/applicantDemographics.jsx on lines 20..38
src/applications/pre-need/config/pages/sponsorDemographics.jsx on lines 31..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 77.

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

  useEffect(
    () => {
      if (currentPage > 1 && records?.length) {
        focusElement(document.querySelector('#showingRecords'));
        window.scrollTo({
src/applications/mhv-medical-records/components/RecordList/RecordList.jsx on lines 59..67

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

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

export const schema = {
  type: 'object',
  properties: {
    application: {
      type: 'object',
src/applications/pre-need-integration/config/pages/nonVeteranApplicantDetails.jsx on lines 39..53
src/applications/pre-need-integration/config/pages/nonVeteranApplicantDetailsPreparer.jsx on lines 35..49
src/applications/pre-need/config/pages/applicantDemographics.jsx on lines 20..38

Duplicated Code

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

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

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

Tuning

This issue has a mass of 77.

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

      <p>
        Four-year college sizes
        <ul>
          <li>
            Very small -- fewer than 1,000 FTEs attend this four-year
src/applications/dhp-connected-devices/components/TermsAndConditions.jsx on lines 6..27
src/applications/mhv-medications/components/PrescriptionDetails/NonVaPrescription.jsx on lines 33..47
src/applications/static-pages/ezr-submission-options/components/Descriptions/index.jsx on lines 67..81

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

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

SubMenu.propTypes = {
  data: PropTypes.object.isRequired,
  show: PropTypes.bool.isRequired,
  navTitle: PropTypes.string.isRequired,
  linkClicked: PropTypes.func.isRequired,
Severity: Major
Found in src/platform/site-wide/mega-menu/components/SubMenu.jsx and 3 other locations - About 2 hrs to fix
src/applications/dhp-connected-devices/components/ConnectedDevicesSection.jsx on lines 83..89
src/applications/static-pages/events/components/Search/SpecificDateFields.jsx on lines 30..36
src/platform/user/profile/vap-svc/components/ContactInfoForm.jsx on lines 25..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 77.

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

  useEffect(
    () => {
      if (currentPage > 1 && records?.length) {
        focusElement(document.querySelector('#showingRecords'));
        window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
src/applications/mhv-medical-records/containers/VitalDetails.jsx on lines 171..183

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

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

export const schema = {
  type: 'object',
  properties: {
    application: {
      type: 'object',
src/applications/pre-need-integration/config/pages/nonVeteranApplicantDetails.jsx on lines 39..53
src/applications/pre-need-integration/config/pages/nonVeteranApplicantDetailsPreparer.jsx on lines 35..49
src/applications/pre-need/config/pages/sponsorDemographics.jsx on lines 31..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 77.

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

export const schema = {
  type: 'object',
  properties: {
    application: {
      type: 'object',
src/applications/pre-need-integration/config/pages/nonVeteranApplicantDetails.jsx on lines 39..53
src/applications/pre-need/config/pages/applicantDemographics.jsx on lines 20..38
src/applications/pre-need/config/pages/sponsorDemographics.jsx on lines 31..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 77.

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