department-of-veterans-affairs/vets-website

View on GitHub
src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx

Summary

Maintainability
D
2 days
Test Coverage

File AdditionalInstructions.jsx has 257 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import PropTypes from 'prop-types';
import { determineBoardObj } from '../../../helpers';
import {
  SHORT_NAME_MAP,

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

            <va-accordion-item header="Can I get VA benefits without a discharge upgrade?">
              <p>
                Even with a less than honorable discharge, you may be able to access
                some VA benefits through the Character of Discharge review process.
                When you apply for VA benefits, we’ll review your record to
    src/applications/discharge-wizard/components/gpMinorComponents/AdditionalInstructions.jsx on lines 49..119

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

    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-accordion-item header="What happens after I send in my application?">
              <p>
                The Board reviews nearly all applications within 18 months. You can
                continue to submit supporting documentation until the Board has
                reviewed your application.
    src/applications/discharge-wizard/components/gpMinorComponents/AdditionalInstructions.jsx on lines 11..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 105.

    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

            {serviceBranch === RESPONSES.ARMY &&
              abbr === BCMR && (
                <li>
                  <a
                    target="_blank"
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 209..221
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 222..234
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 235..246

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

            {serviceBranch === RESPONSES.COAST_GUARD &&
              abbr === BCMR && (
                <li>
                  <a
                    target="_blank"
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 185..197
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 209..221
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 235..246

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

            {serviceBranch === RESPONSES.COAST_GUARD &&
              abbr === DRB && (
                <li>
                  <a
                    target="_blank"
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 185..197
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 209..221
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 222..234

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

            {serviceBranch === RESPONSES.AIR_FORCE &&
              abbr === BCMR && (
                <li>
                  <a
                    target="_blank"
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 185..197
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 222..234
    src/applications/discharge-wizard/components/v2/resultsComponents/AdditionalInstructions.jsx on lines 235..246

    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

    There are no issues that match your filters.

    Category
    Status