department-of-veterans-affairs/vets-website

View on GitHub
src/applications/combined-debt-portal/medical-copays/components/Modals.jsx

Summary

Maintainability
C
7 hrs
Test Coverage

File Modals.jsx has 334 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useState } from 'react';
import {
  VaModal,
  VaButton,
} from '@department-of-veterans-affairs/web-components/react-bindings';

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

          <li>
            Online: Visit
            <a
              className="vads-u-margin--0p5"
              href="http://www.va.gov/healthbenefits/cost"
    src/applications/combined-debt-portal/medical-copays/components/Modals.jsx on lines 181..202
    src/applications/disability-benefits/2346/schemas/address-schema.js on lines 336..349

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

    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

        <p>
          You have the right to request a Hardship Determination which provides an
          exemption from future outpatient and inpatient copayments for the
          remaining calendar year. To do so, send a letter explaining any financial
          hardship these charges will cause you and a completed Request for Hardship
    src/applications/combined-debt-portal/medical-copays/components/Modals.jsx on lines 221..234
    src/applications/disability-benefits/2346/schemas/address-schema.js on lines 336..349

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

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

        <p>
          You have the right to request a waiver of part or all of your debt. If the
          waiver is granted you will not be required to pay the amount waived. To do
          so, submit an explanation and a completed Financial Status Report (VA Form
          5655) found at:
    src/applications/combined-debt-portal/medical-copays/components/HowToPay.jsx on lines 7..20
    src/applications/combined-debt-portal/medical-copays/components/Modals.jsx on lines 126..143
    src/applications/gi/components/profile/Academics.jsx on lines 120..130
    src/applications/proxy-rewrite/partials/mobile/footer/index.jsx on lines 45..55

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

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

        <p>
          You have the right to request a compromise. A compromise means you may
          propose a lesser amount as full settlement of the debt. To request a
          compromise, submit your request in writing to VA, specifying the dollar
          amount you are proposing VA should accept as payment in full, and a
    src/applications/combined-debt-portal/medical-copays/components/HowToPay.jsx on lines 7..20
    src/applications/combined-debt-portal/medical-copays/components/Modals.jsx on lines 102..123
    src/applications/gi/components/profile/Academics.jsx on lines 120..130
    src/applications/proxy-rewrite/partials/mobile/footer/index.jsx on lines 45..55

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

    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