department-of-veterans-affairs/vets-website

View on GitHub
src/applications/fry-dea/components/ConfirmationResponses.jsx

Summary

Maintainability
D
3 days
Test Coverage

Function Approved has 105 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function Approved(name) {
  return (
    <>
      <div>
        <va-alert
Severity: Major
Found in src/applications/fry-dea/components/ConfirmationResponses.jsx - About 4 hrs to fix

    File ConfirmationResponses.jsx has 329 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import PropTypes from 'prop-types';
    import { format } from 'date-fns';
    import GetFormHelp from './GetFormHelp';
    
    
    Severity: Minor
    Found in src/applications/fry-dea/components/ConfirmationResponses.jsx - About 3 hrs to fix

      Function UnderReview has 96 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function UnderReview(response, name) {
        return (
          <>
            <div>
              <va-alert
      Severity: Major
      Found in src/applications/fry-dea/components/ConfirmationResponses.jsx - About 3 hrs to fix

        Function NotEligible has 57 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function NotEligible(name) {
          return (
            <>
              <div>
                <va-alert
        Severity: Major
        Found in src/applications/fry-dea/components/ConfirmationResponses.jsx - About 2 hrs to fix

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

                    <div className="vads-u-margin-top--1p5">
                      <p className="vads-u-margin-top--0 vads-u-margin-bottom--3">
                        Unfortunately, based on the information you provided and
                        Department of Defense records, we have determined you’re not
                        eligible for the Survivors’ and Dependents’ Educational Assistance
          src/applications/fry-dea/components/ConfirmationResponses.jsx on lines 170..191

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

          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

                    <div className="vads-u-margin-top--1p5">
                      <p className="vads-u-margin-top--0 vads-u-margin-bottom--3">
                        We reviewed your application and have determined that you’re
                        entitled to educational benefits under Survivors’ and Dependents’
                        Educational Assistance (DEA, Chapter 35). Your decision letter is
          src/applications/fry-dea/components/ConfirmationResponses.jsx on lines 282..304

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 119.

          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-alert
                    close-btn-aria-label="Close notification"
                    status="success"
                    visible
                  >
          src/applications/ask-va/containers/ReviewPage.jsx on lines 88..105

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

          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

          const NeedHelpComponent = () => {
            return (
              <div className="help-footer-box">
                <h2 className="help-heading">Need help?</h2>
                <GetFormHelp />
          Severity: Minor
          Found in src/applications/fry-dea/components/ConfirmationResponses.jsx and 1 other location - About 40 mins to fix
          src/applications/my-education-benefits/components/FormFooter.jsx on lines 4..11

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

          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