department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,796 of 12,796 total issues

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

RecreationalVehiclesReview.propTypes = {
  data: PropTypes.shape({
    assets: PropTypes.shape({
      recVehicleAmount: PropTypes.string,
    }),
src/applications/financial-status-report/components/householdExpenses/CreditCardBillsSummaryReview.jsx on lines 64..71
src/applications/financial-status-report/components/householdExpenses/HouseholdExpensesSummaryReview.jsx on lines 32..37
src/applications/financial-status-report/components/otherAssets/OtherAssetsSummaryReview.jsx on lines 30..37
src/applications/financial-status-report/components/otherAssets/RealEstateReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/VehicleSummaryReview.jsx on lines 37..44
src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/ProviderName.jsx on lines 15..22

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

CreditCardBillsSummaryReview.propTypes = {
  data: PropTypes.shape({
    expenses: PropTypes.shape({
      creditCardBills: PropTypes.array,
    }),
src/applications/financial-status-report/components/householdExpenses/HouseholdExpensesSummaryReview.jsx on lines 32..37
src/applications/financial-status-report/components/otherAssets/OtherAssetsSummaryReview.jsx on lines 30..37
src/applications/financial-status-report/components/otherAssets/RealEstateReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/RecreationalVehcilesReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/VehicleSummaryReview.jsx on lines 37..44
src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/ProviderName.jsx on lines 15..22

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

ProviderName.propTypes = {
  appointment: PropTypes.shape({
    communityCareProvider: PropTypes.shape({
      providerName: PropTypes.array,
    }),
src/applications/financial-status-report/components/householdExpenses/CreditCardBillsSummaryReview.jsx on lines 64..71
src/applications/financial-status-report/components/householdExpenses/HouseholdExpensesSummaryReview.jsx on lines 32..37
src/applications/financial-status-report/components/otherAssets/OtherAssetsSummaryReview.jsx on lines 30..37
src/applications/financial-status-report/components/otherAssets/RealEstateReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/RecreationalVehcilesReview.jsx on lines 26..33
src/applications/financial-status-report/components/otherAssets/VehicleSummaryReview.jsx on lines 37..44

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

VeteranInformation.propTypes = {
  formData: PropTypes.shape({
    veteran: PropTypes.shape({
      ssnLastFour: PropTypes.string,
      vaFileLastFour: PropTypes.string,
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/TaskPurple/VeteranInformation.jsx on lines 106..113
src/applications/appeals/shared/components/VeteranInformation.jsx on lines 106..113
src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx on lines 109..116
src/applications/disability-benefits/all-claims/components/IndividualsInvolvedCard.jsx on lines 21..28
src/applications/disability-benefits/all-claims/content/contactInformation.jsx on lines 70..77

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

VeteranInformation.propTypes = {
  formData: PropTypes.shape({
    veteran: PropTypes.shape({
      ssnLastFour: PropTypes.string,
      vaFileLastFour: PropTypes.string,
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/TaskPurple/VeteranInformation.jsx on lines 106..113
src/applications/appeals/testing/sc/components/_MockVeteranInformation.jsx on lines 116..123
src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx on lines 109..116
src/applications/disability-benefits/all-claims/components/IndividualsInvolvedCard.jsx on lines 21..28
src/applications/disability-benefits/all-claims/content/contactInformation.jsx on lines 70..77

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

VeteranInformation.propTypes = {
  formData: PropTypes.shape({
    veteran: PropTypes.shape({
      ssnLastFour: PropTypes.string,
      vaFileLastFour: PropTypes.string,
src/applications/appeals/shared/components/VeteranInformation.jsx on lines 106..113
src/applications/appeals/testing/sc/components/_MockVeteranInformation.jsx on lines 116..123
src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx on lines 109..116
src/applications/disability-benefits/all-claims/components/IndividualsInvolvedCard.jsx on lines 21..28
src/applications/disability-benefits/all-claims/content/contactInformation.jsx on lines 70..77

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

ForwardingAddressViewField.propTypes = {
  formData: PropTypes.shape({
    effectiveDate: PropTypes.shape({
      from: PropTypes.string,
      to: PropTypes.string,
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/TaskPurple/VeteranInformation.jsx on lines 106..113
src/applications/appeals/shared/components/VeteranInformation.jsx on lines 106..113
src/applications/appeals/testing/sc/components/_MockVeteranInformation.jsx on lines 116..123
src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx on lines 109..116
src/applications/disability-benefits/all-claims/components/IndividualsInvolvedCard.jsx on lines 21..28

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

VeteranInformation.propTypes = {
  formData: PropTypes.shape({
    veteran: PropTypes.shape({
      ssnLastFour: PropTypes.string,
      vaFileLastFour: PropTypes.string,
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/TaskPurple/VeteranInformation.jsx on lines 106..113
src/applications/appeals/shared/components/VeteranInformation.jsx on lines 106..113
src/applications/appeals/testing/sc/components/_MockVeteranInformation.jsx on lines 116..123
src/applications/disability-benefits/all-claims/components/IndividualsInvolvedCard.jsx on lines 21..28
src/applications/disability-benefits/all-claims/content/contactInformation.jsx on lines 70..77

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

IndividualsInvolvedCard.propTypes = {
  formData: PropTypes.shape({
    name: PropTypes.shape({
      first: PropTypes.string,
      last: PropTypes.string,
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/TaskPurple/VeteranInformation.jsx on lines 106..113
src/applications/appeals/shared/components/VeteranInformation.jsx on lines 106..113
src/applications/appeals/testing/sc/components/_MockVeteranInformation.jsx on lines 116..123
src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx on lines 109..116
src/applications/disability-benefits/all-claims/content/contactInformation.jsx on lines 70..77

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

  useEffect(
    () => {
      focusElement(document.querySelector('h1'));
      updatePageTitle(
        `${record.name} - ${pageTitles.LAB_AND_TEST_RESULTS_PAGE_TITLE}`,
src/applications/mhv-medical-records/components/CareSummaries/AdmissionAndDischargeDetails.jsx on lines 43..51
src/applications/mhv-medical-records/components/CareSummaries/ProgressNoteDetails.jsx on lines 43..51
src/applications/mhv-medical-records/components/LabsAndTests/PathologyDetails.jsx on lines 44..52
src/applications/mhv-medical-records/components/LabsAndTests/RadiologyDetails.jsx on lines 39..47

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

  useEffect(
    () => {
      focusElement(document.querySelector('h1'));
      updatePageTitle(
        `${record.name} - ${pageTitles.CARE_SUMMARIES_AND_NOTES_PAGE_TITLE}`,
src/applications/mhv-medical-records/components/CareSummaries/ProgressNoteDetails.jsx on lines 43..51
src/applications/mhv-medical-records/components/LabsAndTests/MicroDetails.jsx on lines 46..54
src/applications/mhv-medical-records/components/LabsAndTests/PathologyDetails.jsx on lines 44..52
src/applications/mhv-medical-records/components/LabsAndTests/RadiologyDetails.jsx on lines 39..47

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

  useEffect(
    () => {
      focusElement(document.querySelector('h1'));
      updatePageTitle(
        `${record.name} - ${pageTitles.LAB_AND_TEST_RESULTS_PAGE_TITLE}`,
src/applications/mhv-medical-records/components/CareSummaries/AdmissionAndDischargeDetails.jsx on lines 43..51
src/applications/mhv-medical-records/components/CareSummaries/ProgressNoteDetails.jsx on lines 43..51
src/applications/mhv-medical-records/components/LabsAndTests/MicroDetails.jsx on lines 46..54
src/applications/mhv-medical-records/components/LabsAndTests/PathologyDetails.jsx on lines 44..52

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

  const conditionMap = {
    aboutmyselfrelationshipveteran: aboutMyselfRelationshipVeteranCondition,
    aboutmyselfrelationshipfamilymember: aboutMyselfRelationshipFamilyMemberCondition,
    aboutsomeoneelserelationshipveteran: aboutSomeoneElseRelationshipVeteranCondition,
    aboutsomeoneelserelationshipfamilymember: aboutSomeoneElseRelationshipFamilyMemberCondition,
src/applications/claims-status/components/claim-files-tab/AdditionalEvidencePage.jsx on lines 219..230
src/applications/facility-locator/containers/FacilitiesMap.jsx on lines 683..694
src/applications/appeals/shared/props.js on lines 65..76
src/platform/forms-system/src/js/patterns/array-builder/arrayBuilder.jsx on lines 393..404

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

  useEffect(
    () => {
      focusElement(document.querySelector('h1'));
      updatePageTitle(
        `${record.name} - ${pageTitles.CARE_SUMMARIES_AND_NOTES_PAGE_TITLE}`,
src/applications/mhv-medical-records/components/CareSummaries/AdmissionAndDischargeDetails.jsx on lines 43..51
src/applications/mhv-medical-records/components/LabsAndTests/MicroDetails.jsx on lines 46..54
src/applications/mhv-medical-records/components/LabsAndTests/PathologyDetails.jsx on lines 44..52
src/applications/mhv-medical-records/components/LabsAndTests/RadiologyDetails.jsx on lines 39..47

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

export const customPageProps = {
  contentAfterButtons: element,
  contentBeforeButtons: element,
  goBack: func,
  goForward: func,
Severity: Major
Found in src/applications/appeals/shared/props.js and 4 other locations - About 1 hr to fix
src/applications/ask-va/config/schema-helpers/formFlowHelper.js on lines 405..416
src/applications/claims-status/components/claim-files-tab/AdditionalEvidencePage.jsx on lines 219..230
src/applications/facility-locator/containers/FacilitiesMap.jsx on lines 683..694
src/platform/forms-system/src/js/patterns/array-builder/arrayBuilder.jsx on lines 393..404

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

const mapDispatchToProps = {
  addFile,
  removeFile,
  submitFiles,
  updateField,
src/applications/ask-va/config/schema-helpers/formFlowHelper.js on lines 405..416
src/applications/facility-locator/containers/FacilitiesMap.jsx on lines 683..694
src/applications/appeals/shared/props.js on lines 65..76
src/platform/forms-system/src/js/patterns/array-builder/arrayBuilder.jsx on lines 393..404

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

const mapDispatchToProps = {
  geolocateUser,
  clearGeocodeError,
  fetchVAFacility,
  updateSearchQuery,
src/applications/ask-va/config/schema-helpers/formFlowHelper.js on lines 405..416
src/applications/claims-status/components/claim-files-tab/AdditionalEvidencePage.jsx on lines 219..230
src/applications/appeals/shared/props.js on lines 65..76
src/platform/forms-system/src/js/patterns/array-builder/arrayBuilder.jsx on lines 393..404

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

  useEffect(
    () => {
      focusElement(document.querySelector('h1'));
      updatePageTitle(
        `${record.name} - ${pageTitles.LAB_AND_TEST_RESULTS_PAGE_TITLE}`,
src/applications/mhv-medical-records/components/CareSummaries/AdmissionAndDischargeDetails.jsx on lines 43..51
src/applications/mhv-medical-records/components/CareSummaries/ProgressNoteDetails.jsx on lines 43..51
src/applications/mhv-medical-records/components/LabsAndTests/MicroDetails.jsx on lines 46..54
src/applications/mhv-medical-records/components/LabsAndTests/RadiologyDetails.jsx on lines 39..47

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

    const summaryPageProps = {
      arrayPath,
      hasItemsKey,
      firstItemPagePath,
      getText,
src/applications/ask-va/config/schema-helpers/formFlowHelper.js on lines 405..416
src/applications/claims-status/components/claim-files-tab/AdditionalEvidencePage.jsx on lines 219..230
src/applications/facility-locator/containers/FacilitiesMap.jsx on lines 683..694
src/applications/appeals/shared/props.js on lines 65..76

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

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

export const formatDate = (date, format = DATE_FORMAT) => {
  const m = moment(date);
  return date && m.isValid() ? m.format(format) : 'Unknown';
};
src/applications/disability-benefits/all-claims/utils/index.jsx on lines 67..70

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

Severity
Category
Status
Source
Language