department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,821 of 12,821 total issues

File form.js has 273 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { VA_FORM_IDS } from 'platform/forms/constants';
import {
  yesNoSchema,
  yesNoUI,
} from 'platform/forms-system/src/js/web-component-patterns';

    File utils.js has 273 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    
    export const orientationSteps = [
      {
        number: 0,
    Severity: Minor
    Found in src/applications/vre/28-1900/orientation/utils.js - About 2 hrs to fix

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

      const createDowntimeNotificationBase = (services, startTime) => {
        return {
          data: services.map(service => {
            return {
              id: '139',
      src/applications/_mock-form-ae-design-patterns/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/applications/personalization/profile/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/applications/representative-appoint/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/platform/mhv/api/mocks/secure-messaging/endpoints/maintenance-windows/index.js on lines 19..34

      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

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

      const createDowntimeNotificationBase = (services, startTime) => {
        return {
          data: services.map(service => {
            return {
              id: '139',
      src/applications/_mock-form-ae-design-patterns/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/applications/mhv-secure-messaging/api/mocks/endpoints/maintenance-windows/index.js on lines 19..34
      src/applications/personalization/profile/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/platform/mhv/api/mocks/secure-messaging/endpoints/maintenance-windows/index.js on lines 19..34

      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

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

      const createDowntimeNotificationBase = (services, startTime) => {
        return {
          data: services.map(service => {
            return {
              id: '139',
      src/applications/_mock-form-ae-design-patterns/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/applications/mhv-secure-messaging/api/mocks/endpoints/maintenance-windows/index.js on lines 19..34
      src/applications/personalization/profile/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/applications/representative-appoint/mocks/endpoints/maintenance-windows/index.js on lines 21..36

      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

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

      const createDowntimeNotificationBase = (services, startTime) => {
        return {
          data: services.map(service => {
            return {
              id: '139',
      src/applications/mhv-secure-messaging/api/mocks/endpoints/maintenance-windows/index.js on lines 19..34
      src/applications/personalization/profile/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/applications/representative-appoint/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/platform/mhv/api/mocks/secure-messaging/endpoints/maintenance-windows/index.js on lines 19..34

      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

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

      const createDowntimeNotificationBase = (services, startTime) => {
        return {
          data: services.map(service => {
            return {
              id: '139',
      src/applications/_mock-form-ae-design-patterns/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/applications/mhv-secure-messaging/api/mocks/endpoints/maintenance-windows/index.js on lines 19..34
      src/applications/representative-appoint/mocks/endpoints/maintenance-windows/index.js on lines 21..36
      src/platform/mhv/api/mocks/secure-messaging/endpoints/maintenance-windows/index.js on lines 19..34

      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 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_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 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
      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_OTHER1: {
          'ui:title': 'Which vaccine?',
          'ui:options': {
            expandUnder: 'vaccinated',
            hideIf: formData =>
      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
      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 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
      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/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
      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_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 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
      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

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

      const bankInfoHelpText = (
        <va-additional-info
          trigger="What if I don’t have a bank account?"
          onClick={gaBankInfoHelpText}
        >
      src/applications/edu-benefits/10203/components/ShowDirectDepositDropdown.jsx on lines 31..50
      src/applications/edu-benefits/5490/components/ShowDirectDepositDropdown.jsx on lines 31..50

      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

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

        const getApiData = url => {
          isLoading(true);
          return apiRequest(url)
            .then(res => {
              setApiData(res.data);
      Severity: Major
      Found in src/applications/ask-va/containers/SubTopicSelectPage.jsx and 2 other locations - About 2 hrs to fix
      src/applications/ask-va/containers/CategorySelectPage.jsx on lines 52..63
      src/applications/ask-va/containers/TopicSelectPage.jsx on lines 69..80

      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

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

        const getApiData = url => {
          isLoading(true);
          return apiRequest(url)
            .then(res => {
              setApiData(res.data);
      Severity: Major
      Found in src/applications/ask-va/containers/CategorySelectPage.jsx and 2 other locations - About 2 hrs to fix
      src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 37..48
      src/applications/ask-va/containers/TopicSelectPage.jsx on lines 69..80

      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

      Severity
      Category
      Status
      Source
      Language