department-of-veterans-affairs/vets-website

View on GitHub
src/applications/coronavirus-research/update/pages/covidResearchUISchema.js

Summary

Maintainability
F
2 wks
Test Coverage

File covidResearchUISchema.js has 632 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';

import { validateBooleanGroup } from 'platform/forms-system/src/js/validation';
import currentOrPastMonthYearUI from 'platform/forms-system/src/js/definitions/currentOrPastMonthYear';
import MonthYearUI from 'platform/forms-system/src/js/definitions/monthYear';

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

      DIAGNOSED_SYMPTOMS: {
        'ui:options': {
          showFieldLabel: true,
          expandUnder: 'diagnosed',
        },
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 114..187

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

    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

      DIAGNOSED_DETAILS: {
        'ui:options': {
          showFieldLabel: true,
          expandUnder: 'diagnosed',
        },
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 79..113

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

    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

      VACCINATED_SECOND: {
        'ui:title': <span>Did not get second dose</span>,
        'ui:reviewField': CustomReviewField,
        'ui:widget': 'checkbox',
        'ui:options': {
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 298..315

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

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

      VACCINATED_ADDITIONAL_DETAILS5: {
        'ui:title': (
          <span>
            <strong>Which vaccine did you receive?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 333..356
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 395..418
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 457..480
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 519..542
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 581..604
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 169..192
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 231..254
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 293..316
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 355..378

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

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

      VACCINATED_ADDITIONAL_DETAILS1: {
        'ui:title': (
          <span>
            <strong>If Yes, which vaccine did you receive?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 333..356
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 395..418
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 457..480
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 519..542
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 581..604
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 231..254
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 293..316
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 355..378
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 417..440

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

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

      VACCINATED_ADDITIONAL_DETAILS2: {
        'ui:title': (
          <span>
            <strong>Which vaccine did you receive?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 333..356
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 395..418
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 457..480
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 519..542
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 581..604
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 169..192
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 293..316
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 355..378
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 417..440

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

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

      VACCINATED_ADDITIONAL_DETAILS3: {
        'ui:title': (
          <span>
            <strong>Which vaccine did you receive?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 333..356
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 395..418
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 457..480
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 519..542
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 581..604
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 169..192
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 231..254
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 355..378
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 417..440

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

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

      VACCINATED_ADDITIONAL_DETAILS4: {
        'ui:title': (
          <span>
            <strong>Which vaccine did you receive?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 333..356
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 395..418
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 457..480
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 519..542
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 581..604
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 169..192
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 231..254
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 293..316
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 417..440

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

    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

      VACCINATED_DATE2: {
        ...MonthYearUI('Month/Year of 2nd dose (or future date if scheduled)'),
        'ui:options': {
          expandUnder: 'vaccinated',
          monthYear: true,
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 281..297

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

    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

      VACCINATED_DETAILS: {
        'ui:title': (
          <span>
            <strong>Which vaccine did you receive?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 247..270

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

    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

      VACCINATED_PLAN: {
        'ui:title': (
          <span>
            <strong>Do you plan to be vaccinated?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 224..246

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

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

      VACCINATED_ADDITIONAL_OTHER1: {
        'ui:title': 'Which vaccine?',
        'ui:options': {
          expandUnder: 'vaccinated',
          hideIf: formData =>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 357..369
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 419..431
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 481..493
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 543..555
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 605..617
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 255..267
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 317..329
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 379..391
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 441..453

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

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

      VACCINATED_ADDITIONAL_OTHER2: {
        'ui:title': 'Which vaccine?',
        'ui:options': {
          expandUnder: 'vaccinated',
          hideIf: formData =>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 357..369
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 419..431
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 481..493
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 543..555
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 605..617
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 193..205
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 317..329
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 379..391
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 441..453

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

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

      VACCINATED_ADDITIONAL_OTHER4: {
        'ui:title': 'Which vaccine?',
        'ui:options': {
          expandUnder: 'vaccinated',
          hideIf: formData =>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 357..369
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 419..431
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 481..493
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 543..555
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 605..617
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 193..205
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 255..267
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 317..329
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 441..453

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

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

      VACCINATED_ADDITIONAL_OTHER5: {
        'ui:title': 'Which vaccine?',
        'ui:options': {
          expandUnder: 'vaccinated',
          hideIf: formData =>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 357..369
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 419..431
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 481..493
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 543..555
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 605..617
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 193..205
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 255..267
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 317..329
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 379..391

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

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

      VACCINATED_ADDITIONAL_OTHER3: {
        'ui:title': 'Which vaccine?',
        'ui:options': {
          expandUnder: 'vaccinated',
          hideIf: formData =>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 357..369
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 419..431
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 481..493
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 543..555
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 605..617
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 193..205
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 255..267
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 379..391
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 441..453

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

    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

      VACCINATED_ADDITIONAL3: {
        'ui:title': <span>Enter another dose</span>,
        'ui:reviewField': CustomReviewField,
        'ui:widget': 'checkbox',
        'ui:options': {
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 382..394
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 444..456
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 506..518
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 568..580
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 218..230
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 342..354
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 404..416

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

    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

      VACCINATED_ADDITIONAL2: {
        'ui:title': <span>Enter another dose</span>,
        'ui:reviewField': CustomReviewField,
        'ui:widget': 'checkbox',
        'ui:options': {
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 382..394
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 444..456
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 506..518
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 568..580
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 280..292
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 342..354
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 404..416

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

    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

      VACCINATED_ADDITIONAL5: {
        'ui:title': <span>Enter another dose</span>,
        'ui:reviewField': CustomReviewField,
        'ui:widget': 'checkbox',
        'ui:options': {
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 382..394
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 444..456
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 506..518
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 568..580
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 218..230
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 280..292
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 342..354

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

    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

      VACCINATED_ADDITIONAL4: {
        'ui:title': <span>Enter another dose</span>,
        'ui:reviewField': CustomReviewField,
        'ui:widget': 'checkbox',
        'ui:options': {
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 382..394
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 444..456
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 506..518
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 568..580
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 218..230
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 280..292
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 404..416

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

    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

      VACCINATED_ADDITIONAL1: {
        'ui:title': (
          <span>
            <strong>
              Have you received any additional vaccine doses (including boosters)?
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 316..332

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

      VACCINATED_ADDITIONAL_DATE1: {
        ...currentOrPastMonthYearUI('Month/Year of dose'),
        'ui:options': {
          expandUnder: 'vaccinated',
          monthYear: true,
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 370..381
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 432..443
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 494..505
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 556..567
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 618..629
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 268..279
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 330..341
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 392..403
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 454..465

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

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

      VACCINATED_ADDITIONAL_DATE2: {
        ...currentOrPastMonthYearUI('Month/Year of dose'),
        'ui:options': {
          expandUnder: 'vaccinated',
          monthYear: true,
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 370..381
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 432..443
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 494..505
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 556..567
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 618..629
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 206..217
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 330..341
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 392..403
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 454..465

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

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

      VACCINATED_ADDITIONAL_DATE4: {
        ...currentOrPastMonthYearUI('Month/Year of dose'),
        'ui:options': {
          expandUnder: 'vaccinated',
          monthYear: true,
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 370..381
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 432..443
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 494..505
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 556..567
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 618..629
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 206..217
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 268..279
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 330..341
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 454..465

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

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

      VACCINATED_ADDITIONAL_DATE5: {
        ...currentOrPastMonthYearUI('Month/Year of dose'),
        'ui:options': {
          expandUnder: 'vaccinated',
          monthYear: true,
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 370..381
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 432..443
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 494..505
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 556..567
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 618..629
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 206..217
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 268..279
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 330..341
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 392..403

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

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

      VACCINATED_ADDITIONAL_DATE3: {
        ...currentOrPastMonthYearUI('Month/Year of dose'),
        'ui:options': {
          expandUnder: 'vaccinated',
          monthYear: true,
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 370..381
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 432..443
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 494..505
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 556..567
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 618..629
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 206..217
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 268..279
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 392..403
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 454..465

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

    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

      VACCINATED_DATE1: {
        ...currentOrPastMonthYearUI('Month/Year of 1st dose'),
        'ui:options': {
          expandUnder: 'vaccinated',
          monthYear: true,
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 271..280

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

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

      vaccinated: {
        'ui:title': (
          <span>
            <strong>Have you received a COVID-19 vaccine?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 67..78
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 212..223
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 630..644
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 645..659
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 951..962
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 963..974
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 466..477
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 587..598
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 599..610

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

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

      diagnosed: {
        'ui:title': (
          <span>
            <strong>Have you ever been diagnosed with COVID-19?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 67..78
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 212..223
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 630..644
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 645..659
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 951..962
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 963..974
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 48..59
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 587..598
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 599..610

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

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

      FACILITY: {
        'ui:title': (
          <span>
            <strong>Do you receive care at a VA facility?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 67..78
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 212..223
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 630..644
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 645..659
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 951..962
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 963..974
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 48..59
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 466..477
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 587..598

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

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

      ELIGIBLE: {
        'ui:title': (
          <span>
            <strong>Are you eligible to receive care at a VA facility?</strong>
          </span>
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 67..78
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 212..223
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 630..644
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 645..659
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 951..962
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 963..974
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 48..59
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 466..477
    src/applications/coronavirus-research/update/pages/covidResearchUISchema.js on lines 599..610

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

    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

    function vaLocationReviewWidget({ value }) {
      return <span>{value ? value?.split('|')[0] : `None`}</span>;
    }
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 25..27

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

    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 conditionalValidateBooleanGroup = (errors, pageData) => {
      const { diagnosed, DIAGNOSED_DETAILS } = pageData;
      if (diagnosed) {
        validateBooleanGroup(errors.DIAGNOSED_DETAILS, DIAGNOSED_DETAILS);
      }
    src/applications/coronavirus-research/sign-up/pages/covidResearchUISchema.js on lines 18..23

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

    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