department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,804 of 12,804 total issues

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

    {
      id: '3033876',
      type: 'message_details',
      attributes: {
        messageId: 3033876,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 63..91
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1255..1283
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1313..1343
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1344..1372
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1373..1401
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1460..1488
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1665..1693

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

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

    {
      id: '3549590',
      type: 'message_details',
      attributes: {
        messageId: 3549590,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 861..889
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1255..1283
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1313..1343
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1344..1372
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1373..1401
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1460..1488
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1665..1693

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

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

    {
      id: '3813790',
      type: 'message_details',
      attributes: {
        messageId: 3813790,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 63..91
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 861..889
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1255..1283
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1344..1372
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1373..1401
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1460..1488
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1665..1693

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

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

    {
      id: '3549581',
      type: 'message_details',
      attributes: {
        messageId: 3549581,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 770..798
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 992..1020
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1021..1049
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1050..1078
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1108..1136

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

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

    {
      id: '3064900',
      type: 'message_details',
      attributes: {
        messageId: 3064900,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 992..1020
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1021..1049
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1050..1078
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1079..1107
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1108..1136

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

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

    {
      id: '3109074',
      type: 'message_details',
      attributes: {
        messageId: 3109074,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 770..798
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 992..1020
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1021..1049
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1050..1078
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1079..1107

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

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

    {
      id: '3885180',
      type: 'message_details',
      attributes: {
        messageId: 3885180,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 770..798
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1021..1049
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1050..1078
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1079..1107
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1108..1136

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

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

    {
      id: '3623589',
      type: 'message_details',
      attributes: {
        messageId: 3623589,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 770..798
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 992..1020
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1050..1078
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1079..1107
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1108..1136

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

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

    {
      id: '3550443',
      type: 'message_details',
      attributes: {
        messageId: 3550443,
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 770..798
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 992..1020
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1021..1049
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1079..1107
src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1108..1136

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

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

    const id = `${
      isRoot && formContext.onReviewPage
        ? Object.keys(idSchema)
            .reduce((ids, key) => {
              ids.push(idSchema[key].$id || '');
Severity: Major
Found in src/platform/forms-system/src/js/fields/ObjectField.jsx and 1 other location - About 4 hrs to fix
src/platform/user/profile/vap-svc/components/DeselectableObjectField.jsx on lines 294..304

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

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

const readableList = (list, joiner = 'and') => {
  const cleanedList = list.filter(Boolean);
  if (cleanedList.length < 2) {
    return cleanedList.join('');
  }
src/applications/financial-status-report/utils/contactInformation.js on lines 13..21

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

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 WIP = () => (
  <div className="row vads-u-margin-bottom--5">
    <div className="usa-width-two-thirds medium-8 columns">
      <va-alert status="warning">
        <h1 slot="headline" className="vads-u-font-size--h3">
src/applications/lgy/coe/shared/components/WIP.jsx on lines 3..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 132.

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 WIP = () => (
  <div className="row vads-u-margin-bottom--5">
    <div className="usa-width-two-thirds medium-8 columns">
      <va-alert status="warning">
        <h1 slot="headline" className="vads-u-font-size--h3">
Severity: Major
Found in src/applications/lgy/coe/shared/components/WIP.jsx and 1 other location - About 4 hrs to fix
src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/shared/components/WIP.jsx on lines 3..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 132.

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

    const id = `${
      isRoot && formContext.onReviewPage
        ? Object.keys(idSchema)
            .reduce((ids, key) => {
              ids.push(idSchema[key].$id || '');
src/platform/forms-system/src/js/fields/ObjectField.jsx on lines 240..250

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

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 readableList = (list, joiner = 'and') => {
  const cleanedList = list.filter(Boolean);
  if (cleanedList.length < 2) {
    return cleanedList.join('');
  }
src/platform/forms-system/src/js/utilities/data/readableList.js on lines 13..21

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

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

const SpouseFinancialSupportDescription = (
  <va-additional-info
    trigger="What we consider financial support for a spouse"
    class="vads-u-margin-bottom--4 hydrated"
    uswds
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/SpouseFinancialSupportDescription.jsx on lines 3..25
src/applications/hca/components/FormDescriptions/index.jsx on lines 478..500

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

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

export const SpouseFinancialSupportDescription = (
  <va-additional-info
    trigger="What we consider financial support for a spouse"
    class="vads-u-margin-y--2"
    uswds
Severity: Major
Found in src/applications/hca/components/FormDescriptions/index.jsx and 2 other locations - About 4 hrs to fix
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/SpouseFinancialSupportDescription.jsx on lines 3..25
src/applications/ezr/components/FormDescriptions/SpouseFinancialSupportDescription.jsx on lines 3..25

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

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

const SpouseFinancialSupportDescription = (
  <va-additional-info
    trigger="What we consider financial support for a spouse"
    class="vads-u-margin-bottom--4 hydrated"
    uswds
src/applications/ezr/components/FormDescriptions/SpouseFinancialSupportDescription.jsx on lines 3..25
src/applications/hca/components/FormDescriptions/index.jsx on lines 478..500

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

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

  <>
    <h3>Withdrawal from the legacy appeals process</h3>
    <div>
      <p>
        If you’re requesting a Higher-Level Review on a decision we made before
Severity: Major
Found in src/applications/appeals/996/content/Authorization.jsx and 1 other location - About 4 hrs to fix
src/applications/pensions/components/FormAlerts/index.jsx on lines 16..40

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

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

export const evidenceTypeHelp = (
  <va-additional-info trigger="Which evidence type should I choose?">
    <h4>Types of evidence</h4>
    <h5 className="vads-u-padding-top--1p5">
      Required Separation Health Assessment - Part A Self-Assessment
src/applications/disability-benefits/all-claims/content/evidenceTypes.jsx on lines 3..30

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

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