department-of-veterans-affairs/vets-website

View on GitHub
src/applications/survivor-dependent-education-benefit/22-5490/components/confirmation/UnderReviewConfirmationDEAChapter35.jsx

Summary

Maintainability
F
4 days
Test Coverage

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

const UnderReviewConfirmation = ({ user, printPage, dateReceived }) => {
  useEffect(() => {
    // Logic for sending confirmation email or any other setup if needed
  }, []);

src/applications/survivor-dependent-education-benefit/22-5490/components/confirmation/UnderReviewConfirmationFry.jsx on lines 4..122

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

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

UnderReviewConfirmation.propTypes = {
  printPage: PropTypes.func.isRequired,
  user: PropTypes.string.isRequired,
  dateReceived: PropTypes.string,
};
src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskGray/shared/components/StatusAlert/statuses/Available.jsx on lines 27..31
src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskGray/status/components/DocumentUploader/FileListItem.jsx on lines 33..37
src/applications/claims-status/components/TogglerRoute.jsx on lines 31..35
src/applications/claims-status/components/appeals-v2/CurrentStatus.jsx on lines 20..24
src/applications/claims-status/components/appeals-v2/DocketCard.jsx on lines 44..48
src/applications/facility-locator/components/Alert.jsx on lines 32..36
src/applications/financial-status-report/components/employment/EmploymentHistoryWidget.jsx on lines 79..83
src/applications/gi/components/IconWithInfo.jsx on lines 15..19
src/applications/gi/components/search/OnlineClassesFilter.jsx on lines 33..37
src/applications/gi/containers/LicenseCertificationSearchResult.jsx on lines 44..48
src/applications/letters/components/DownloadLetterLink.jsx on lines 111..115
src/applications/lgy/coe/shared/components/StatusAlert/statuses/Available.jsx on lines 27..31
src/applications/lgy/coe/status/components/DocumentUploader/FileListItem.jsx on lines 33..37
src/applications/my-education-benefits/components/ContactInformationReviewPanel.jsx on lines 73..77
src/applications/personalization/profile/components/edit/EditConfirmCancelModal.jsx on lines 45..49
src/applications/representative-appoint/components/Phone.jsx on lines 22..26
src/applications/sco/components/HubRail/shared/mainContentSubDiv.jsx on lines 16..20
src/applications/sco/components/HubRail/shared/mainContentSubSection.jsx on lines 17..21
src/applications/static-pages/cta-widget/components/messages/OpenMyHealtheVet.jsx on lines 28..32
src/applications/static-pages/cta-widget/components/messages/Verify.jsx on lines 30..34
src/applications/survivor-dependent-education-benefit/22-5490/components/confirmation/UnderReviewConfirmationFry.jsx on lines 124..128
src/applications/vaos/appointment-list/components/AppointmentListNavigation.jsx on lines 89..93
src/applications/vaos/appointment-list/components/AppointmentsPage/AppointmentFlexGrid.jsx on lines 20..24
src/applications/vaos/referral-appointments/components/RequestsList.jsx on lines 93..97
src/platform/forms-system/src/js/web-component-fields/VaFileInputField.jsx on lines 105..109
src/applications/check-in/components/AppointmentBlock.jsx on lines 64..68

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

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