department-of-veterans-affairs/vets-website

View on GitHub
src/applications/my-education-benefits/components/confirmation/UnderReviewChapter1606.jsx

Summary

Maintainability
F
3 days
Test Coverage

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

const UnderReviewChapter1606 = ({
  claimantName,
  confirmationDate,
  printPage,
}) => {
src/applications/my-education-benefits/components/confirmation/UnderReviewChapter30.jsx on lines 5..89

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

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

UnderReviewChapter1606.propTypes = {
  claimantName: PropTypes.string.isRequired,
  confirmationDate: PropTypes.string.isRequired,
  printPage: PropTypes.func.isRequired,
};
src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskGray/form/components/statuses/Pending.jsx on lines 33..37
src/applications/claims-status/components/appeals-v2/NextEvent.jsx on lines 12..16
src/applications/combined-debt-portal/medical-copays/components/DownloadStatement.jsx on lines 62..66
src/applications/dhp-connected-devices/components/DevicesToConnectSection.jsx on lines 102..106
src/applications/dhp-connected-devices/components/DisconnectModal.jsx on lines 31..35
src/applications/discharge-wizard/containers/FormPage.jsx on lines 32..36
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionInputList.jsx on lines 248..252
src/applications/gi/components/profile/ProfileSection.jsx on lines 12..16
src/applications/gi/components/profile/Programs.jsx on lines 35..39
src/applications/gi/components/profile/VeteranProgramsAndSupport.jsx on lines 151..155
src/applications/gi/components/profile/schoolRatings/RatingHeading.jsx on lines 27..31
src/applications/gi/components/search/SearchTabs.jsx on lines 76..80
src/applications/gi/containers/Modals.jsx on lines 1057..1061
src/applications/lgy/coe/form/components/statuses/Pending.jsx on lines 33..37
src/applications/my-education-benefits/components/confirmation/UnderReviewChapter30.jsx on lines 91..95
src/applications/personalization/profile/components/connected-apps/AppDeletedAlert.jsx on lines 32..36
src/applications/representative-search/components/results/PaginationWrapper.jsx on lines 29..33
src/applications/sco/components/HubRail/shared/liSpanAndVaLinkAndPTag.jsx on lines 11..15
src/applications/sco/components/HubRail/shared/liVaIconAndVaLink.jsx on lines 10..14
src/applications/static-pages/events/components/Search/FilterBy.jsx on lines 31..35
src/applications/vaos/appointment-list/components/PastAppointmentsList/PastAppointmentsDateDropdown.jsx on lines 43..47
src/applications/vaos/new-appointment/components/CommunityCareProviderSelectionPage/ProviderSelectionField.jsx on lines 71..75
src/applications/vaos/referral-appointments/components/DateAndTimeContent.jsx on lines 258..262
src/applications/vaos/referral-appointments/components/PendingReferralCard.jsx on lines 82..86

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

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