department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,846 of 12,846 total issues

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

  const {
    personalData: {
      employmentHistory: {
        veteran: { employmentRecords = [] } = {},
        newRecord = {},
src/applications/financial-status-report/components/employment/EmploymentWorkDates.jsx on lines 29..36
src/applications/financial-status-report/components/employment/SpouseEmploymentWorkDates.jsx on lines 29..36
src/applications/financial-status-report/components/householdIncome/GrossMonthlyIncomeInput.jsx on lines 22..29
src/applications/financial-status-report/components/householdIncome/PayrollDeductionInputList.jsx on lines 29..36
src/applications/financial-status-report/components/householdIncome/SpouseGrossMonthlyIncomeInput.jsx on lines 24..31
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionChecklist.jsx on lines 23..30
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionInputList.jsx on lines 30..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 8 locations. Consider refactoring.
Open

  const {
    personalData: {
      employmentHistory: {
        veteran: { employmentRecords = [] } = {},
        newRecord = {},
src/applications/financial-status-report/components/employment/EmploymentWorkDates.jsx on lines 29..36
src/applications/financial-status-report/components/employment/SpouseEmploymentWorkDates.jsx on lines 29..36
src/applications/financial-status-report/components/householdIncome/GrossMonthlyIncomeInput.jsx on lines 22..29
src/applications/financial-status-report/components/householdIncome/PayrollDeductionChecklist.jsx on lines 22..29
src/applications/financial-status-report/components/householdIncome/SpouseGrossMonthlyIncomeInput.jsx on lines 24..31
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionChecklist.jsx on lines 23..30
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionInputList.jsx on lines 30..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 8 locations. Consider refactoring.
Open

  const {
    personalData: {
      employmentHistory: {
        spouse: { spEmploymentRecords = [] } = {},
        newRecord = {},
src/applications/financial-status-report/components/employment/EmploymentWorkDates.jsx on lines 29..36
src/applications/financial-status-report/components/householdIncome/GrossMonthlyIncomeInput.jsx on lines 22..29
src/applications/financial-status-report/components/householdIncome/PayrollDeductionChecklist.jsx on lines 22..29
src/applications/financial-status-report/components/householdIncome/PayrollDeductionInputList.jsx on lines 29..36
src/applications/financial-status-report/components/householdIncome/SpouseGrossMonthlyIncomeInput.jsx on lines 24..31
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionChecklist.jsx on lines 23..30
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionInputList.jsx on lines 30..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 8 locations. Consider refactoring.
Open

  const {
    personalData: {
      employmentHistory: {
        spouse: { spEmploymentRecords = [] } = {},
        newRecord = {},
src/applications/financial-status-report/components/employment/EmploymentWorkDates.jsx on lines 29..36
src/applications/financial-status-report/components/employment/SpouseEmploymentWorkDates.jsx on lines 29..36
src/applications/financial-status-report/components/householdIncome/GrossMonthlyIncomeInput.jsx on lines 22..29
src/applications/financial-status-report/components/householdIncome/PayrollDeductionChecklist.jsx on lines 22..29
src/applications/financial-status-report/components/householdIncome/PayrollDeductionInputList.jsx on lines 29..36
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionChecklist.jsx on lines 23..30
src/applications/financial-status-report/components/householdIncome/SpousePayrollDeductionInputList.jsx on lines 30..37

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 7 locations. Consider refactoring.
Open

export const errorMessages = {
  savedFormNotFound: 'Please start over to request a Higher-Level Review',
  savedFormNoAuth:
    'Please sign in again to continue your request for Higher-Level Review',

Severity: Major
Found in src/applications/appeals/testing/hlr/constants.js and 6 other locations - About 1 hr to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 143..153
src/applications/disability-benefits/686c-674-v2/config/constants.js on lines 7..18
src/applications/mhv-medical-records/util/constants.js on lines 166..182
src/applications/simple-forms/21-4142/definitions/constants.js on lines 1..11
src/applications/simple-forms/26-4555/definitions/constants.js on lines 1..11
src/applications/appeals/996/constants.js on lines 45..61

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

export const veteranFields = {
  parentObject: 'veteran',
  fullName: 'fullName',
  dateOfBirth: 'dateOfBirth',
  ssn: 'ssn',
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 143..153
src/applications/disability-benefits/686c-674-v2/config/constants.js on lines 7..18
src/applications/mhv-medical-records/util/constants.js on lines 166..182
src/applications/simple-forms/21-4142/definitions/constants.js on lines 1..11
src/applications/appeals/996/constants.js on lines 45..61
src/applications/appeals/testing/hlr/constants.js on lines 45..61

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

export const TASK_KEYS = {
  addChild: 'addChild',
  addDisabledChild: 'addDisabledChild',
  addSpouse: 'addSpouse',
  reportDivorce: 'reportDivorce',
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 143..153
src/applications/mhv-medical-records/util/constants.js on lines 166..182
src/applications/simple-forms/21-4142/definitions/constants.js on lines 1..11
src/applications/simple-forms/26-4555/definitions/constants.js on lines 1..11
src/applications/appeals/996/constants.js on lines 45..61
src/applications/appeals/testing/hlr/constants.js on lines 45..61

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

export const pageTitles = {
  MEDICAL_RECORDS_PAGE_TITLE: 'Medical Records | Veterans Affairs',
  LAB_AND_TEST_RESULTS_PAGE_TITLE:
    'Lab And Test Results - Medical Records | Veterans Affairs',
  CARE_SUMMARIES_AND_NOTES_PAGE_TITLE:
Severity: Major
Found in src/applications/mhv-medical-records/util/constants.js and 6 other locations - About 1 hr to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 143..153
src/applications/disability-benefits/686c-674-v2/config/constants.js on lines 7..18
src/applications/simple-forms/21-4142/definitions/constants.js on lines 1..11
src/applications/simple-forms/26-4555/definitions/constants.js on lines 1..11
src/applications/appeals/996/constants.js on lines 45..61
src/applications/appeals/testing/hlr/constants.js on lines 45..61

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

        medalAwardPage: {
          depends: formData => formData.otherReasons?.MEDAL_AWARD,
          path: 'evidence-medal-award',
          title:
            'Upload evidence for Medal of Honor or Purple Heart award recipient',
Severity: Major
Found in src/applications/simple-forms/20-10207/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10207/config/form.js on lines 478..485
src/applications/simple-forms/20-10207/config/form.js on lines 486..493
src/applications/simple-forms/20-10207/config/form.js on lines 494..502
src/applications/simple-forms/20-10207/config/form.js on lines 503..511
src/applications/simple-forms/20-10207/config/form.js on lines 532..539

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

    personalInformationChapter: {
      title: 'Your name and date of birth',
      pages: {
        personalInfoPage: {
          path: 'personal-information',
Severity: Major
Found in src/applications/simple-forms/20-10206/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10206/config/form.js on lines 141..152
src/applications/simple-forms/20-10206/config/form.js on lines 153..164
src/applications/simple-forms/20-10206/config/form.js on lines 165..176
src/applications/simple-forms/20-10206/config/form.js on lines 263..274
src/applications/simple-forms/20-10206/config/form.js on lines 275..286

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

    mailingAddressChapter: {
      title: 'Your mailing address',
      pages: {
        addressPage: {
          path: 'contact-information',
Severity: Major
Found in src/applications/simple-forms/20-10206/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10206/config/form.js on lines 104..115
src/applications/simple-forms/20-10206/config/form.js on lines 153..164
src/applications/simple-forms/20-10206/config/form.js on lines 165..176
src/applications/simple-forms/20-10206/config/form.js on lines 263..274
src/applications/simple-forms/20-10206/config/form.js on lines 275..286

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

        alsPage: {
          depends: formData => formData.otherReasons?.ALS,
          path: 'evidence-als',
          title:
            'Upload evidence for diagnosis of ALS (amyotrophic lateral sclerosis)',
Severity: Major
Found in src/applications/simple-forms/20-10207/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10207/config/form.js on lines 478..485
src/applications/simple-forms/20-10207/config/form.js on lines 486..493
src/applications/simple-forms/20-10207/config/form.js on lines 503..511
src/applications/simple-forms/20-10207/config/form.js on lines 532..539
src/applications/simple-forms/20-10207/config/form.js on lines 540..548

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

export const mappingTypes = {
  GOALS: 'goals',
  LENGTH_OF_SERVICE: 'militaryServiceTotalTimeServed',
  CURRENTLY_SERVING: 'militaryServiceCurrentlyServing',
  PREVIOUS_SERVICE: 'militaryServiceCompleted',
src/applications/disability-benefits/686c-674-v2/config/constants.js on lines 7..18
src/applications/mhv-medical-records/util/constants.js on lines 166..182
src/applications/simple-forms/21-4142/definitions/constants.js on lines 1..11
src/applications/simple-forms/26-4555/definitions/constants.js on lines 1..11
src/applications/appeals/996/constants.js on lines 45..61
src/applications/appeals/testing/hlr/constants.js on lines 45..61

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

        vsiPage: {
          depends: formData => formData.otherReasons?.VSI_SI,
          path: 'evidence-vsi',
          title:
            'Upload evidence for Seriously or Very Seriously Injured or Ill during military operations',
Severity: Major
Found in src/applications/simple-forms/20-10207/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10207/config/form.js on lines 478..485
src/applications/simple-forms/20-10207/config/form.js on lines 486..493
src/applications/simple-forms/20-10207/config/form.js on lines 494..502
src/applications/simple-forms/20-10207/config/form.js on lines 532..539
src/applications/simple-forms/20-10207/config/form.js on lines 540..548

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

        powDocumentsPage: {
          depends: formData => formData.otherReasons?.FORMER_POW,
          path: 'evidence-pow-documents',
          title: 'Upload evidence for prisoner of war status',
          uiSchema: powDocsPg.uiSchema,
Severity: Major
Found in src/applications/simple-forms/20-10207/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10207/config/form.js on lines 478..485
src/applications/simple-forms/20-10207/config/form.js on lines 486..493
src/applications/simple-forms/20-10207/config/form.js on lines 494..502
src/applications/simple-forms/20-10207/config/form.js on lines 503..511
src/applications/simple-forms/20-10207/config/form.js on lines 540..548

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

export const errorMessages = {
  savedFormNotFound: 'Please start over to request a Higher-Level Review',
  savedFormNoAuth:
    'Please sign in again to continue your request for Higher-Level Review',

Severity: Major
Found in src/applications/appeals/996/constants.js and 6 other locations - About 1 hr to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 143..153
src/applications/disability-benefits/686c-674-v2/config/constants.js on lines 7..18
src/applications/mhv-medical-records/util/constants.js on lines 166..182
src/applications/simple-forms/21-4142/definitions/constants.js on lines 1..11
src/applications/simple-forms/26-4555/definitions/constants.js on lines 1..11
src/applications/appeals/testing/hlr/constants.js on lines 45..61

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

    contactInformationChapter: {
      title: 'Your contact information',
      pages: {
        phoneEmailPage: {
          path: 'phone-email',
Severity: Major
Found in src/applications/simple-forms/20-10206/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10206/config/form.js on lines 104..115
src/applications/simple-forms/20-10206/config/form.js on lines 141..152
src/applications/simple-forms/20-10206/config/form.js on lines 165..176
src/applications/simple-forms/20-10206/config/form.js on lines 263..274
src/applications/simple-forms/20-10206/config/form.js on lines 275..286

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

export const uiSchema = {
  'ui:title': 'Training pay waiver',
  waiveTrainingPay: {
    'ui:title': ' ',
    'ui:description': waiveTrainingPayDescription,
src/platform/testing/e2e/cypress/support/commands/keyboardNavigation.js on lines 288..298

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

    recordsChapter: {
      title: 'Records',
      pages: {
        recordSelectionsPage: {
          path: 'record-selections',
Severity: Major
Found in src/applications/simple-forms/20-10206/config/form.js and 5 other locations - About 1 hr to fix
src/applications/simple-forms/20-10206/config/form.js on lines 104..115
src/applications/simple-forms/20-10206/config/form.js on lines 141..152
src/applications/simple-forms/20-10206/config/form.js on lines 153..164
src/applications/simple-forms/20-10206/config/form.js on lines 263..274
src/applications/simple-forms/20-10206/config/form.js on lines 275..286

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

export const veteranFields = {
  parentObject: 'veteran',
  fullName: 'fullName',
  dateOfBirth: 'dateOfBirth',
  ssn: 'ssn',
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 143..153
src/applications/disability-benefits/686c-674-v2/config/constants.js on lines 7..18
src/applications/mhv-medical-records/util/constants.js on lines 166..182
src/applications/simple-forms/26-4555/definitions/constants.js on lines 1..11
src/applications/appeals/996/constants.js on lines 45..61
src/applications/appeals/testing/hlr/constants.js on lines 45..61

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

Severity
Category
Status
Source
Language