department-of-veterans-affairs/vets-website

View on GitHub
src/applications/hca/components/FormDescriptions/index.jsx

Summary

Maintainability
F
1 wk
Test Coverage

File index.jsx has 617 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { APP_URLS, LAST_YEAR } from '../../utils/constants';

/** CHAPTER 1: Veteran Information */
export const BirthInfoDescription = (
Severity: Major
Found in src/applications/hca/components/FormDescriptions/index.jsx - About 1 day to fix

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

    export const DependentDescription = () => (
      <va-additional-info
        trigger="Who we consider a dependent"
        class="vads-u-margin-top--2 vads-u-margin-bottom--3"
        uswds
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 2 other locations - About 1 day to fix
    src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/DependentDescription.jsx on lines 4..40
    src/applications/ezr/components/FormDescriptions/DependentDescription.jsx on lines 4..40

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

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

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

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

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

    Refactorings

    Further Reading

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

    export const CompensationTypeDescription = (
      <va-additional-info
        trigger="Why we ask for this information"
        class="vads-u-margin-top--2 vads-u-margin-bottom--3"
        uswds
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 1 other location - About 7 hrs to fix
    src/applications/simple-forms/mock-simple-forms-patterns/components/formDescriptions.jsx on lines 3..36

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

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

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

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

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

    Refactorings

    Further Reading

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

    export const EducationalExpensesDescription = (
      <va-additional-info
        trigger="What we consider college or vocational expenses"
        class="vads-u-margin-y--1"
        uswds
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 1 other location - About 5 hrs to fix
    src/applications/ezr/components/FormDescriptions/ExpensesDescriptions.jsx on lines 3..26

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

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

    export const DependentSupportDescription = (
      <va-additional-info
        trigger="What we consider financial support for a dependent"
        class="vads-u-margin-top--2 vads-u-margin-bottom--3"
        uswds
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 2 other locations - About 5 hrs to fix
    src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/DependentSupportDescription.jsx on lines 3..24
    src/applications/ezr/components/FormDescriptions/DependentSupportDescription.jsx on lines 3..24

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

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

    export const SpouseFinancialSupportDescription = (
      <va-additional-info
        trigger="What we consider financial support for a spouse"
        class="vads-u-margin-y--2"
        uswds
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 2 other locations - About 4 hrs to fix
    src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/SpouseFinancialSupportDescription.jsx on lines 3..25
    src/applications/ezr/components/FormDescriptions/SpouseFinancialSupportDescription.jsx on lines 3..25

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

    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

      <va-additional-info
        trigger="What we consider non-reimbursable medical expenses"
        class="vads-u-margin-y--1"
        uswds
      >
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 1 other location - About 4 hrs to fix
    src/applications/ezr/components/FormDescriptions/ExpensesDescriptions.jsx on lines 29..51

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

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

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

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

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

    Refactorings

    Further Reading

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

        <va-additional-info
          trigger="What to know before you decide to share your gender identity"
          class="vads-u-margin-top--2 vads-u-margin-bottom--3"
          uswds
        >
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 1 other location - About 2 hrs to fix
    src/applications/ezr/components/FormDescriptions/SigiDescription.jsx on lines 4..30

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

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

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

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

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

    Refactorings

    Further Reading

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

          <ul>
            <li>
              What types of VA health care benefits you’re eligible for,{' '}
              <strong>and</strong>
            </li>
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 1 other location - About 2 hrs to fix
    src/applications/post-911-gib-status/utils/helpers.jsx on lines 53..65

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

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

    export const MaritalStatusDescription = (
      <va-additional-info
        trigger="Why we ask for this information"
        class="vads-u-margin-top--2 vads-u-margin-bottom--3"
        uswds
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 2 other locations - About 1 hr to fix
    src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/MaritalStatusDescription.jsx on lines 3..18
    src/applications/ezr/components/FormDescriptions/MaritalStatusDescription.jsx on lines 3..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 62.

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

    export const ContactInfoDescription = (
      <>
        <p>
          Adding your email and phone number is optional. But this information helps
          us contact you faster if we need to follow up with you about your
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 2 other locations - About 1 hr to fix
    src/applications/disability-benefits/686c-674-v2/config/chapters/household-income/helpers.js on lines 4..19
    src/applications/disability-benefits/686c-674/config/chapters/household-income/helpers.js on lines 4..19

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

    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 SpouseAdditionalInformationTitle = (
      <>
        Spouse’s additional information
        <span className="sr-only">.</span>
        <div className="vads-u-color--base vads-u-font-family--sans vads-u-font-size--base vads-u-font-weight--normal vads-u-line-height--6 vads-u-margin-top--2">
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 3 other locations - About 50 mins to fix
    src/applications/disability-benefits/view-payments/components/view-payments-lists/helpers.js on lines 93..103
    src/applications/disability-benefits/view-payments/components/view-payments-lists/helpers.js on lines 105..113
    src/applications/hca/components/FormDescriptions/index.jsx on lines 441..450

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

    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 SpouseBasicInformationDescription = (
      <>
        Spouse’s personal information
        <span className="sr-only">.</span>
        <div className="vads-u-color--base vads-u-font-family--sans vads-u-font-size--base vads-u-font-weight--normal vads-u-line-height--6 vads-u-margin-y--2">
    Severity: Major
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 3 other locations - About 50 mins to fix
    src/applications/disability-benefits/view-payments/components/view-payments-lists/helpers.js on lines 93..103
    src/applications/disability-benefits/view-payments/components/view-payments-lists/helpers.js on lines 105..113
    src/applications/hca/components/FormDescriptions/index.jsx on lines 452..461

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

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

    export const PolicyOrGroupDescription = (
      <div className="schemaform-block-title schemaform-block-subtitle vads-u-margin-top--6 vads-u-margin-bottom--2 vads-u-color--primary-darker">
        Provide either your insurance policy number or group code.{' '}
        <span className="schemaform-required-span vads-u-font-family--sans vads-u-font-size--base vads-u-font-weight--normal">
          (*Required)
    Severity: Minor
    Found in src/applications/hca/components/FormDescriptions/index.jsx and 2 other locations - About 40 mins to fix
    src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/InsurancePolicyDescriptions.jsx on lines 7..14
    src/applications/ezr/components/FormDescriptions/InsurancePolicyDescriptions.jsx on lines 7..14

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

    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

    There are no issues that match your filters.

    Category
    Status