department-of-veterans-affairs/vets-website

View on GitHub
src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx

Summary

Maintainability
F
3 days
Test Coverage

File results-set-1-page-1-dynamic-content.jsx has 297 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { Fragment } from 'react';
import { RESPONSES, SHORT_NAME_MAP } from './question-data-map';
import { locationList as BurnPit211Locations } from '../containers/questions/burn-pit/BurnPit-2-1-1';
import { locationList as BurnPit212Locations } from '../containers/questions/burn-pit/BurnPit-2-1-2';
import { locationList as BurnPit213Locations } from '../containers/questions/burn-pit/BurnPit-2-1-3';

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

      [BURN_PIT_2_1_2]: [
        {
          response: YES,
          content: (
            <Fragment key={BURN_PIT_2_1_2}>
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 40..54
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 73..87

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

    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

      [BURN_PIT_2_1_3]: [
        {
          response: YES,
          content: (
            <Fragment key={BURN_PIT_2_1_3}>
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 40..54
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 55..72

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

    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

      [BURN_PIT_2_1_1]: [
        {
          response: YES,
          content: (
            <Fragment key={BURN_PIT_2_1_1}>
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 55..72
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 73..87

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

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

        {
          response: THAILAND,
          content: (
            <li key={`${ORANGE_2_2_1_B}-6`}>
              Agent Orange or other herbicide exposure from service on any U.S. or
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 182..192
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 243..253
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 254..265

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

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

        {
          response: LAOS,
          content: (
            <li key={`${ORANGE_2_2_1_B}-5`}>
              Agent Orange or other herbicide exposure from service in Laos from{' '}
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 193..204
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 243..253
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 254..265

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

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

        {
          response: ENEWETAK_ATOLL,
          content: (
            <li key={`${RADIATION_2_3_B}-1`}>
              Radiation exposure from the cleanup of Enewetak Atoll, from{' '}
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 182..192
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 193..204
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 254..265

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

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

        {
          response: SPAIN_PALOMARES,
          content: (
            <li key={`${RADIATION_2_3_B}-2`}>
              Radiation exposure from the cleanup of the Air Force B-52 bomber
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 182..192
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 193..204
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 243..253

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

    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 {
      AMERICAN_SAMOA,
      CAMBODIA,
      ENEWETAK_ATOLL,
      GREENLAND_THULE,
    src/applications/mhv-secure-messaging/components/Draft/DeleteDraft.jsx on lines 28..42

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          response: AMERICAN_SAMOA,
          content: (
            <li key={`${ORANGE_2_2_1_B}-1`}>
              Agent Orange exposure from service in American Samoa or its
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 125..135
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 149..159
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 160..170
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 266..277

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          response: CAMBODIA,
          content: (
            <li key={`${ORANGE_2_2_1_B}-2`}>
              Agent Orange exposure from service in Cambodia at Mimot or Krek,
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 125..135
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 138..148
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 160..170
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 266..277

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          response: KOREA_DMZ,
          content: (
            <li key={`${ORANGE_2_2_B}-3`}>
              Agent Orange exposure from service at or near the Korean Demilitarized
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 138..148
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 149..159
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 160..170
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 266..277

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          response: GUAM,
          content: (
            <li key={`${ORANGE_2_2_1_B}-3`}>
              Agent Orange exposure from service in Guam or its territorial waters
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 125..135
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 138..148
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 149..159
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 266..277

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          response: GREENLAND_THULE,
          content: (
            <li key={`${RADIATION_2_3_B}-3`}>
              Radiation exposure from the response to the fire onboard an Air Force
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 125..135
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 138..148
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 149..159
    src/applications/pact-act/constants/results-set-1-page-1-dynamic-content.jsx on lines 160..170

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

    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

    There are no issues that match your filters.

    Category
    Status