department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,675 of 12,675 total issues

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

const InsurancePolicyReviewPage = ({ data, editPage }) => {
  const { providers } = data;
  const reviewRows = providers.map((item, index) => {
    const { insuranceName, insurancePolicyHolderName } = item;
    return (
src/applications/ezr/components/FormReview/InsurancePolicyReviewPage.jsx on lines 5..56

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

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

const InsurancePolicyReviewPage = ({ data, editPage }) => {
  const { providers } = data;
  const reviewRows = providers.map((item, index) => {
    const { insuranceName, insurancePolicyHolderName } = item;
    return (
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/InsurancePolicyReviewPage.jsx on lines 5..56

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

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 function submitTransformer(formConfig, form) {
  const { data: formData, loadedData } = form;
  const expandedPages = expandArrayPages(
    createFormPageList(formConfig),
    formData,
src/applications/ezr/utils/helpers/submit-transformer.js on lines 18..84

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

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 function submitTransformer(formConfig, form) {
  const { data: formData, loadedData } = form;
  const expandedPages = expandArrayPages(
    createFormPageList(formConfig),
    formData,
Severity: Major
Found in src/applications/ezr/utils/helpers/submit-transformer.js and 1 other location - About 2 days to fix
src/applications/_mock-form-ae-design-patterns/utils/helpers/submit-transformer.js on lines 18..84

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

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

File Modals.jsx has 1024 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { connect } from 'react-redux';
import recordEvent from 'platform/monitoring/record-event';
import { VaModal } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import * as actions from '../actions';
Severity: Major
Found in src/applications/gi/containers/Modals.jsx - About 2 days to fix

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

    const ShowAlertOrSip = ({ basename, sipOptions, bottom }) => {
      const loggedIn = useSelector(isLoggedIn);
      // Verified LOA3?
      const isVerified = useSelector(
        state => selectProfile(state)?.verified || false,
    src/applications/appeals/shared/components/ShowAlertOrSip.jsx on lines 13..69

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

    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 ShowAlertOrSip = ({ basename, sipOptions, bottom }) => {
      const loggedIn = useSelector(isLoggedIn);
      // Verified LOA3?
      const isVerified = useSelector(
        state => selectProfile(state)?.verified || false,
    Severity: Major
    Found in src/applications/appeals/shared/components/ShowAlertOrSip.jsx and 1 other location - About 2 days to fix
    src/applications/_mock-form-ae-design-patterns/patterns/pattern1/TaskPurple/ShowAlertOrSip.jsx on lines 13..69

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

    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

      const handlers = {
        onGroupChange: event => {
          // event.target.name doesn't work on va-checkbox
          const name = event.target.getAttribute('name');
          const { checked } = event.detail;
    src/applications/appeals/shared/components/AreaOfDisagreement.jsx on lines 69..117

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

    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

      const handlers = {
        onGroupChange: event => {
          // event.target.name doesn't work on va-checkbox
          const name = event.target.getAttribute('name');
          const { checked } = event.detail;
    src/applications/appeals/testing/hlr/components/AreaOfDisagreement.jsx on lines 69..117

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '12342',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1184..1328
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1481..1625

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '123411',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 162..306
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1184..1328

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '12349',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 162..306
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1481..1625

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

    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

      return (
        <form className="rjsf">
          <fieldset className="vads-u-margin-bottom--2">
            <legend id="root__title" className="schemaform-block-title">
              <h3 className="vads-u-color--gray-dark vads-u-margin-top--0 vads-u-margin-bottom--3">
    Severity: Major
    Found in src/applications/ezr/components/FormPages/InsuranceSummary.jsx and 1 other location - About 2 days to fix
    src/applications/_mock-form-ae-design-patterns/patterns/pattern1/ezr/components/InsuranceSummary.jsx on lines 89..156

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

    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

      return (
        <form className="rjsf">
          <fieldset className="vads-u-margin-bottom--2">
            <legend id="root__title" className="schemaform-block-title">
              <h3 className="vads-u-color--gray-dark vads-u-margin-top--0 vads-u-margin-bottom--3">
    src/applications/ezr/components/FormPages/InsuranceSummary.jsx on lines 85..152

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '12343',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '12344',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '123412',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '123414',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '12347',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

    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

        {
          fullUrl:
            'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
          resource: {
            id: '12345',
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
    src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

    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