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

          <va-additional-info
            trigger={`${translateDateIntoMonthYearFormat(
              actBegin,
            )} verification details`}
            class="vads-u-margin-bottom--4"
Severity: Major
Found in src/applications/verify-your-enrollment/helpers.jsx and 1 other location - About 1 day to fix
src/applications/verify-your-enrollment/helpers.jsx on lines 290..340

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

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 validateDate = (errors, rawDateString = '', fullData) => {
  const date = createDateObject(rawDateString);
  const error =
    (fullData?.dateType || 'decisions') === 'decisions'
      ? sharedErrorMessages.decisions
Severity: Major
Found in src/applications/appeals/995/validations/date.js and 1 other location - About 1 day to fix
src/applications/appeals/testing/sc/validations/date.js on lines 14..41

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

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 validateDate = (errors, rawDateString = '', fullData) => {
  const date = createDateObject(rawDateString);
  const error =
    (fullData?.dateType || 'decisions') === 'decisions'
      ? sharedErrorMessages.decisions
Severity: Major
Found in src/applications/appeals/testing/sc/validations/date.js and 1 other location - About 1 day to fix
src/applications/appeals/995/validations/date.js on lines 14..41

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

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

      {apiData.length > 15 ? (
        <VaSelect
          id={id}
          name={id}
          value={value}
src/applications/ask-va/components/FormFields/SubtopicSelect.jsx on lines 60..96

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

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 UploadDescription = () => {
  const types = SUPPORTED_UPLOAD_TYPES.map(text => text.toUpperCase());
  const list = readableList(types, 'or');
  return (
    <div className="vads-u-margin-top--2">
Severity: Major
Found in src/applications/appeals/995/content/evidenceUpload.jsx and 1 other location - About 1 day to fix
src/applications/appeals/testing/sc/content/evidenceUpload.jsx on lines 11..57

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

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

      {apiData.length > 15 ? (
        <VaSelect
          id={id}
          name={id}
          value={value}
src/applications/ask-va/components/FormFields/TopicSelect.jsx on lines 73..105

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

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 UploadDescription = () => {
  const types = SUPPORTED_UPLOAD_TYPES.map(text => text.toUpperCase());
  const list = readableList(types, 'or');
  return (
    <div className="vads-u-margin-top--2">
src/applications/appeals/995/content/evidenceUpload.jsx on lines 11..57

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

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 LandingPage.jsx has 657 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useEffect, useRef, useState } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { Link, useLocation } from 'react-router-dom';
import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
import FEATURE_FLAG_NAMES from '@department-of-veterans-affairs/platform-utilities/featureFlagNames';
Severity: Major
Found in src/applications/mhv-medications/containers/LandingPage.jsx - About 1 day to fix

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

    export default function App({ location, children }) {
      useEffect(() => {
        // Insert CSS to hide 'For example: January 19 2000' hint on memorable dates
        // (can't be overridden by passing 'hint' to uiOptions):
        addStyleToShadowDomOnPages(
    Severity: Major
    Found in src/applications/ivc-champva/10-10D/containers/App.jsx and 1 other location - About 1 day to fix
    src/applications/ivc-champva/10-7959C/containers/App.jsx on lines 31..70

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 270.

    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

    describe('check in', () => {
      describe('navigation utils', () => {
        describe('getTokenFromLocation', () => {
          it('returns the id of the query object of the location provided', () => {
            const location = {
    src/applications/check-in/utils/navigation/travel-claim/navigation.test.unit.spec.js on lines 9..41

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

    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 default function App({ location, children }) {
      useEffect(() => {
        // Insert CSS to hide 'For example: January 19 2000' hint on memorable dates
        // (can't be overridden by passing 'hint' to uiOptions):
        addStyleToShadowDomOnPages(
    Severity: Major
    Found in src/applications/ivc-champva/10-7959C/containers/App.jsx and 1 other location - About 1 day to fix
    src/applications/ivc-champva/10-10D/containers/App.jsx on lines 30..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 270.

    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

    describe('check in', () => {
      describe('navigation utils', () => {
        describe('getTokenFromLocation', () => {
          it('returns the id of the query object of the location provided', () => {
            const location = {
    src/applications/check-in/utils/navigation/day-of/navigation.test.unit.spec.js on lines 5..37

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

    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

    Function addressUI has 293 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function addressUI(options) {
      let cachedPath;
      let cityMaxLength = 100;
    
      const omit = key => options?.omit?.includes(key);

      File helpers.js has 654 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from 'react';
      import { merge } from 'lodash';
      import PropTypes from 'prop-types';
      import get from 'platform/utilities/data/get';
      import omit from 'platform/utilities/data/omit';
      Severity: Major
      Found in src/applications/pre-need/utils/helpers.js - About 1 day to fix

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

        export default {
          uiSchema: {
            ...titleUI(uiTitle, uiDescription),
            'ui:description': () => TERMINAL_ILLNESS_DESCRIPTION,
            'ui:objectViewField': TerminalIllnessViewField,
        src/applications/simple-forms/20-10207/pages/evidenceALS.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidenceFinancialHardship.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceMedalAward.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidencePowDocuments.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceVSI.js on lines 16..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 268.

        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

        export default {
          uiSchema: {
            ...titleUI(uiTitle, uiDescription),
            'ui:description': () => VSI_DESCRIPTION,
            'ui:objectViewField': VsiViewField,
        Severity: Major
        Found in src/applications/simple-forms/20-10207/pages/evidenceVSI.js and 5 other locations - About 1 day to fix
        src/applications/simple-forms/20-10207/pages/evidenceALS.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidenceFinancialHardship.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceMedalAward.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidencePowDocuments.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceTerminalIllness.js on lines 15..75

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

        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

        export default {
          uiSchema: {
            ...titleUI(uiTitle, uiDescription),
            'ui:description': () => ALS_DESCRIPTION,
            'ui:objectViewField': AlsViewField,
        Severity: Major
        Found in src/applications/simple-forms/20-10207/pages/evidenceALS.js and 5 other locations - About 1 day to fix
        src/applications/simple-forms/20-10207/pages/evidenceFinancialHardship.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceMedalAward.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidencePowDocuments.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceTerminalIllness.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceVSI.js on lines 16..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 268.

        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

        export default {
          uiSchema: {
            ...titleUI(uiTitle, uiDescription),
            'ui:description': () => FINANCIAL_HARDSHIP_DESCRIPTION,
            'ui:objectViewField': FinancialHardshipViewField,
        src/applications/simple-forms/20-10207/pages/evidenceALS.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidenceMedalAward.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidencePowDocuments.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceTerminalIllness.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceVSI.js on lines 16..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 268.

        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

        export default {
          uiSchema: {
            ...titleUI(uiTitle, uiDescription),
            'ui:description': () => MEDAL_AWARD_DESCRIPTION,
            'ui:objectViewField': MedalAwardViewField,
        src/applications/simple-forms/20-10207/pages/evidenceALS.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidenceFinancialHardship.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidencePowDocuments.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceTerminalIllness.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceVSI.js on lines 16..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 268.

        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

        export default {
          uiSchema: {
            ...titleUI(uiTitle, uiDescription),
            'ui:description': () => POW_DESCRIPTION,
            'ui:objectViewField': PowViewField,
        src/applications/simple-forms/20-10207/pages/evidenceALS.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidenceFinancialHardship.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceMedalAward.js on lines 16..76
        src/applications/simple-forms/20-10207/pages/evidenceTerminalIllness.js on lines 15..75
        src/applications/simple-forms/20-10207/pages/evidenceVSI.js on lines 16..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 268.

        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