Sorry, data for that comparison is no longer available.

department-of-veterans-affairs/vets-website

View on GitHub
src/applications/static-pages/mhv-signin-cta/components/messages/UnverifiedAlert.jsx

Summary

Maintainability
B
4 hrs
Test Coverage

Function MhvAlert has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const MhvAlert = () => {
    return (
      <CustomAlert headline={headline} icon="lock" status="warning">
        <div>
          <p>

    Function DefaultAlert has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const DefaultAlert = () => {
        return (
          <div data-testid="mhv-unverified-alert">
            <CustomAlert
              headline={headline}

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

      UnverifiedAlert.propTypes = {
        signInService: PropTypes.string.isRequired,
        hasSsoe: PropTypes.bool,
        recordEvent: PropTypes.func,
        serviceDescription: PropTypes.string,
      src/applications/claims-status/components/ClaimCard/ClaimCard.jsx on lines 23..28
      src/applications/claims-status/components/ClaimPhase.jsx on lines 20..25
      src/applications/discharge-wizard/components/questions/BranchOfService.jsx on lines 67..72
      src/applications/discharge-wizard/components/questions/CourtMartial.jsx on lines 77..82
      src/applications/discharge-wizard/components/questions/DischargeMonth.jsx on lines 63..68
      src/applications/discharge-wizard/components/questions/DischargeType.jsx on lines 66..71
      src/applications/discharge-wizard/components/questions/DischargeYear.jsx on lines 68..73
      src/applications/discharge-wizard/components/questions/FailureToExhaust.jsx on lines 77..82
      src/applications/discharge-wizard/components/questions/Intention.jsx on lines 66..71
      src/applications/discharge-wizard/components/questions/PrevApplication.jsx on lines 68..73
      src/applications/discharge-wizard/components/questions/PrevApplicationType.jsx on lines 82..87
      src/applications/discharge-wizard/components/questions/PrevApplicationYear.jsx on lines 72..77
      src/applications/discharge-wizard/components/questions/PriorService.jsx on lines 82..87
      src/applications/discharge-wizard/components/questions/Reason.jsx on lines 70..75
      src/applications/find-forms/components/SearchResult.jsx on lines 219..224
      src/applications/mhv-medications/components/PrescriptionDetails/PrescriptionPrintOnly.jsx on lines 264..269
      src/applications/personalization/dashboard/components/notifications/Notifications.jsx on lines 96..101
      src/applications/static-pages/cta-widget/components/messages/DirectDeposit/Unauthed.jsx on lines 36..41
      src/applications/vaos/new-appointment/components/ReviewPage/ReviewRequestInfo/index.jsx on lines 38..43
      src/applications/vaos/new-appointment/components/VAFacilityPage/EligibilityModal.jsx on lines 39..44
      src/platform/forms-system/src/js/components/ConfirmationView/ChapterSectionCollection.jsx on lines 324..329
      src/platform/user/authentication/components/SessionTimeoutModal.jsx on lines 155..160
      src/applications/check-in/components/layout/ReloadWrapper.jsx on lines 134..139

      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

      There are no issues that match your filters.

      Category
      Status