department-of-veterans-affairs/vets-website

View on GitHub
src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx

Summary

Maintainability
F
3 days
Test Coverage

File ConfirmationPage.jsx has 345 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import PropTypes from 'prop-types';
import { connect, useSelector } from 'react-redux';

import { ConfirmationPageView } from '../../shared/components/ConfirmationPageView';
Severity: Minor
Found in src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx - About 4 hrs to fix

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

    ConfirmationPage.propTypes = {
      form: PropTypes.shape({
        data: PropTypes.shape({
          fullName: {
            first: PropTypes.string,
    src/applications/_mock-form-ae-design-patterns/shared/components/pages/ConfirmationPage.jsx on lines 69..85
    src/applications/_mock-form/containers/ConfirmationPage.jsx on lines 72..88
    src/applications/edu-benefits/10215/containers/ConfirmationPage.jsx on lines 68..84
    src/applications/edu-benefits/10216/containers/ConfirmationPage.jsx on lines 67..83
    src/applications/edu-benefits/10282/containers/ConfirmationPage.jsx on lines 68..84
    src/applications/edu-benefits/1919/containers/ConfirmationPage.jsx on lines 67..83
    src/applications/edu-benefits/8794/containers/ConfirmationPage.jsx on lines 66..82
    src/applications/form-renderer/containers/ConfirmationPage.jsx on lines 73..89
    src/applications/income-and-asset-statement/containers/ConfirmationPage.jsx on lines 53..69
    src/applications/simple-forms/21P-0847/containers/ConfirmationPage.jsx on lines 88..104
    src/applications/simple-forms/mock-form-minimal-header/containers/ConfirmationPage.jsx on lines 29..45
    src/applications/simple-forms/mock-simple-forms-patterns-v3/containers/ConfirmationPage.jsx on lines 29..45
    src/applications/simple-forms/mock-simple-forms-patterns/containers/ConfirmationPage.jsx on lines 94..110
    src/applications/survivor-dependent-education-benefit/22-5490/containers/ConfirmationPage.jsx on lines 68..84
    src/applications/travel-pay/containers/ConfirmationPage.jsx on lines 68..84

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

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

          <va-accordion-item header="Auto allowance">
            <ul>
              <li>
                Application for Automobile or Other Conveyance and Adaptive
                Equipment (VA Form 21-4502)
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="Accrued benefits">
            <ul>
              <li>
                Application for Accrued Amounts Due a Deceased Beneficiary (VA Form
                21P-601)
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="Benefits for certain children with disabilities">
            <ul>
              <li>
                Application for Benefits for a Qualifying Veteran’s Child Born with
                Disabilities (VA Form 21-0304)
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="Compensation">
            <ul>
              <li>
                Application for Disability Compensation and Related Compensation
                Benefits (VA Form 21-526EZ)
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="Compensation or Pension">
            <ul>
              <li>
                Intent to File a Claim for Compensation and/or Pension, or Survivors
                Pension and/or DIC (VA Form 21-0966)
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="Dependent parent(s)">
            <ul>
              <li>
                Statement of Dependency of Parent(s) (VA Form 21P-509)
                <br />
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="Individual unemployability">
            <ul>
              <li>
                Veteran’s Application for Increased Compensation Based on
                Unemployability (VA Form 21-8940)
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="Dependents">
            <ul>
              <li>
                Application Request to Add and/or Remove Dependents (VA Form
                21-686c)
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="School-age children (ages 18 to 23 and in school)">
            <ul>
              <li>
                Request for Approval of School Attendance (VA Form 21-674)
                <br />
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 249..260

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

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

          <va-accordion-item header="Specially adapted housing or special home adaptation">
            <ul>
              <li>
                Application in Acquiring Specially Adapted Housing or Special Home
                Adaptation Grant (VA Form 26-4555)
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 28..39
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 66..77
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 78..89
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 90..101
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 102..113
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 114..125
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 126..136
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 137..148
    src/applications/simple-forms/21-0972/containers/ConfirmationPage.jsx on lines 238..248

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

    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