department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,835 of 12,835 total issues

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

  isRequired = name => {
    const { schema } = this.props;
    const schemaRequired =
      Array.isArray(schema.required) && schema.required.indexOf(name) !== -1;

src/applications/disability-benefits/2346/components/ReviewCardField.jsx on lines 517..527
src/applications/health-care-supply-reordering/components/ReviewCardField.jsx on lines 509..519
src/applications/my-education-benefits/components/AccordionField.jsx on lines 147..157

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

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

  isRequired = name => {
    const { schema } = this.props;
    const schemaRequired =
      Array.isArray(schema.required) && schema.required.indexOf(name) !== -1;

src/applications/disability-benefits/2346/components/ReviewCardField.jsx on lines 517..527
src/applications/my-education-benefits/components/AccordionField.jsx on lines 147..157
src/platform/forms-system/src/js/components/ReviewCardField.jsx on lines 383..393

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

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

  isRequired = name => {
    const { schema } = this.props;
    const schemaRequired =
      Array.isArray(schema.required) && schema.required.indexOf(name) !== -1;

src/applications/disability-benefits/2346/components/ReviewCardField.jsx on lines 517..527
src/applications/health-care-supply-reordering/components/ReviewCardField.jsx on lines 509..519
src/platform/forms-system/src/js/components/ReviewCardField.jsx on lines 383..393

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

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

  isRequired = name => {
    const { schema } = this.props;
    const schemaRequired =
      Array.isArray(schema.required) && schema.required.indexOf(name) !== -1;

src/applications/health-care-supply-reordering/components/ReviewCardField.jsx on lines 509..519
src/applications/my-education-benefits/components/AccordionField.jsx on lines 147..157
src/platform/forms-system/src/js/components/ReviewCardField.jsx on lines 383..393

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

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

const createUserWithDataClaims = (user, claims) => {
  const result = cloneDeep(user);
  claims.forEach(claim => {
    result.data.attributes.profile.claims[claim.name] = claim.value;
  });
src/applications/personalization/profile/mocks/endpoints/user/index.js on lines 10..16
src/applications/representative-appoint/mocks/endpoints/user/index.js on lines 10..16

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

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

      if (
        currentFile.name?.endsWith('pdf') &&
        !password &&
        checkResults.checkIsEncryptedPdf
      ) {
Severity: Major
Found in src/platform/forms-system/src/js/fields/FileField.jsx and 2 other locations - About 2 hrs to fix
src/applications/pre-need/components/FileField.jsx on lines 282..296
src/applications/simple-forms/40-0247/components/FileField.jsx on lines 288..302

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

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

      if (
        currentFile.name?.endsWith('pdf') &&
        !password &&
        checkResults.checkIsEncryptedPdf
      ) {
Severity: Major
Found in src/applications/pre-need/components/FileField.jsx and 2 other locations - About 2 hrs to fix
src/applications/simple-forms/40-0247/components/FileField.jsx on lines 288..302
src/platform/forms-system/src/js/fields/FileField.jsx on lines 275..289

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

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

const createUserWithDataClaims = (user, claims) => {
  const result = cloneDeep(user);
  claims.forEach(claim => {
    result.data.attributes.profile.claims[claim.name] = claim.value;
  });
src/applications/_mock-form-ae-design-patterns/mocks/endpoints/user/index.js on lines 10..16
src/applications/personalization/profile/mocks/endpoints/user/index.js on lines 10..16

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

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

      if (
        currentFile.name?.endsWith('pdf') &&
        !password &&
        checkResults.checkIsEncryptedPdf
      ) {
src/applications/pre-need/components/FileField.jsx on lines 282..296
src/platform/forms-system/src/js/fields/FileField.jsx on lines 275..289

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

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

const createUserWithDataClaims = (user, claims) => {
  const result = cloneDeep(user);
  claims.forEach(claim => {
    result.data.attributes.profile.claims[claim.name] = claim.value;
  });
src/applications/_mock-form-ae-design-patterns/mocks/endpoints/user/index.js on lines 10..16
src/applications/representative-appoint/mocks/endpoints/user/index.js on lines 10..16

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

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

          it('Renders the correct messege for facility canceld', () => {
            const { getByTestId } = render(
              <CheckInProvider
                store={dayOfCheckInStore}
                router={upcomingAppointmentFourRoute}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681

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

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

        it('renders Prepare block', () => {
          const { getByTestId } = render(
            <CheckInProvider
              store={preCheckInStore}
              router={appointmentTwoRoute}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

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

        it('renders phone number if available', () => {
          const { getByTestId } = render(
            <CheckInProvider
              store={preCheckInStore}
              router={appointmentTwoRoute}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

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

        it('renders facility information', () => {
          const { getByTestId } = render(
            <CheckInProvider
              store={preCheckInStore}
              router={appointmentOneRoute}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

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

        it('renders facility information', () => {
          const { getByTestId } = render(
            <CheckInProvider
              store={preCheckInStore}
              router={appointmentSixRoute}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

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

        it('renders doctor name if exists', () => {
          const { getByTestId } = render(
            <CheckInProvider
              store={preCheckInStore}
              router={appointmentTwoRoute}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 671..681
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

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

          it('Renders the canceled alert', () => {
            const { getByTestId } = render(
              <CheckInProvider
                store={dayOfCheckInStore}
                router={upcomingAppointmentThreeRoute}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 264..274
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 394..404
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 509..519
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 522..532
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 533..543
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 694..704

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

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

          <VaTextInput
            width="md"
            error={(submitted && nameError) || null}
            id="add-utility-bill-name"
            label="What is the utility bill?"
src/applications/financial-status-report/components/householdIncome/AddIncome.jsx on lines 109..121
src/applications/financial-status-report/components/householdIncome/SpouseAddIncome.jsx on lines 114..126
src/applications/financial-status-report/components/otherAssets/AddAsset.jsx on lines 102..114
src/applications/financial-status-report/components/otherExpenses/AddOtherExpense.jsx on lines 114..126

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

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 priorityProcessingRequestPage = {
  uiSchema: {
    ...titleUI({
      title: "There's a better way to request priority processing",
      headerLevel: 1,
src/applications/simple-forms/21-4138/pages/layOrWitness.js on lines 5..24
src/applications/simple-forms/21-4138/pages/newEvidence.js on lines 5..24
src/applications/simple-forms/21-4138/pages/noticeOfDisagreement.js on lines 76..95
src/applications/simple-forms/21-4138/pages/recordsRequest.js on lines 5..24

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

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

          <VaTextInput
            width="md"
            error={(submitted && nameError) || null}
            id="add-other-income-name"
            label="What is the income source?"
src/applications/financial-status-report/components/householdIncome/SpouseAddIncome.jsx on lines 114..126
src/applications/financial-status-report/components/otherAssets/AddAsset.jsx on lines 102..114
src/applications/financial-status-report/components/otherExpenses/AddOtherExpense.jsx on lines 114..126
src/applications/financial-status-report/components/utilityBills/AddUtilityBill.jsx on lines 104..116

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

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