department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,918 of 12,918 total issues

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

export default function Form0993App({ location, children }) {
  return (
    <RoutedSavableApp formConfig={formConfig} currentLocation={location}>
      {children}
    </RoutedSavableApp>
Severity: Major
Found in src/applications/edu-benefits/0993/Form0993App.jsx and 21 other locations - About 55 mins to fix
src/applications/_mock-form/containers/App.jsx on lines 6..12
src/applications/edu-benefits/10215/containers/App.jsx on lines 6..12
src/applications/edu-benefits/10216/containers/App.jsx on lines 6..12
src/applications/edu-benefits/1919/containers/App.jsx on lines 6..12
src/applications/edu-benefits/8794/containers/App.jsx on lines 6..12
src/applications/mock-sip-form/containers/App.jsx on lines 6..12
src/applications/personalization/review-information/containers/App.jsx on lines 6..12
src/applications/sah/sahg/containers/App.jsx on lines 6..12
src/applications/simple-forms/21-0845/containers/App.jsx on lines 9..15
src/applications/simple-forms/21-0966/containers/App.jsx on lines 6..12
src/applications/simple-forms/21-0972/containers/App.jsx on lines 9..15
src/applications/simple-forms/21-10210/containers/App.jsx on lines 7..13
src/applications/simple-forms/21-4142/containers/App.jsx on lines 6..12
src/applications/simple-forms/21P-0847/containers/App.jsx on lines 6..12
src/applications/simple-forms/26-4555/containers/App.jsx on lines 6..12
src/applications/simple-forms/40-0247/containers/App.jsx on lines 9..15
src/applications/simple-forms/mock-form-minimal-header/containers/App.jsx on lines 6..12
src/applications/simple-forms/mock-simple-forms-patterns/containers/App.jsx on lines 6..12
src/applications/travel-pay/containers/App.jsx on lines 6..12
src/applications/ask-a-question/App.jsx on lines 6..12
src/applications/edu-benefits/10203/Form10203App.jsx on lines 6..12

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

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

export default function App({ location, children }) {
  return (
    <RoutedSavableApp formConfig={formConfig} currentLocation={location}>
      {children}
    </RoutedSavableApp>
Severity: Major
Found in src/applications/_mock-form/containers/App.jsx and 21 other locations - About 55 mins to fix
src/applications/edu-benefits/10215/containers/App.jsx on lines 6..12
src/applications/edu-benefits/10216/containers/App.jsx on lines 6..12
src/applications/edu-benefits/1919/containers/App.jsx on lines 6..12
src/applications/edu-benefits/8794/containers/App.jsx on lines 6..12
src/applications/mock-sip-form/containers/App.jsx on lines 6..12
src/applications/personalization/review-information/containers/App.jsx on lines 6..12
src/applications/sah/sahg/containers/App.jsx on lines 6..12
src/applications/simple-forms/21-0845/containers/App.jsx on lines 9..15
src/applications/simple-forms/21-0966/containers/App.jsx on lines 6..12
src/applications/simple-forms/21-0972/containers/App.jsx on lines 9..15
src/applications/simple-forms/21-10210/containers/App.jsx on lines 7..13
src/applications/simple-forms/21-4142/containers/App.jsx on lines 6..12
src/applications/simple-forms/21P-0847/containers/App.jsx on lines 6..12
src/applications/simple-forms/26-4555/containers/App.jsx on lines 6..12
src/applications/simple-forms/40-0247/containers/App.jsx on lines 9..15
src/applications/simple-forms/mock-form-minimal-header/containers/App.jsx on lines 6..12
src/applications/simple-forms/mock-simple-forms-patterns/containers/App.jsx on lines 6..12
src/applications/travel-pay/containers/App.jsx on lines 6..12
src/applications/ask-a-question/App.jsx on lines 6..12
src/applications/edu-benefits/0993/Form0993App.jsx on lines 6..12
src/applications/edu-benefits/10203/Form10203App.jsx on lines 6..12

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

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

export default function App({ location, children }) {
  return (
    <RoutedSavableApp formConfig={formConfig} currentLocation={location}>
      {children}
    </RoutedSavableApp>
Severity: Major
Found in src/applications/simple-forms/21-0972/containers/App.jsx and 21 other locations - About 55 mins to fix
src/applications/_mock-form/containers/App.jsx on lines 6..12
src/applications/edu-benefits/10215/containers/App.jsx on lines 6..12
src/applications/edu-benefits/10216/containers/App.jsx on lines 6..12
src/applications/edu-benefits/1919/containers/App.jsx on lines 6..12
src/applications/edu-benefits/8794/containers/App.jsx on lines 6..12
src/applications/mock-sip-form/containers/App.jsx on lines 6..12
src/applications/personalization/review-information/containers/App.jsx on lines 6..12
src/applications/sah/sahg/containers/App.jsx on lines 6..12
src/applications/simple-forms/21-0845/containers/App.jsx on lines 9..15
src/applications/simple-forms/21-0966/containers/App.jsx on lines 6..12
src/applications/simple-forms/21-10210/containers/App.jsx on lines 7..13
src/applications/simple-forms/21-4142/containers/App.jsx on lines 6..12
src/applications/simple-forms/21P-0847/containers/App.jsx on lines 6..12
src/applications/simple-forms/26-4555/containers/App.jsx on lines 6..12
src/applications/simple-forms/40-0247/containers/App.jsx on lines 9..15
src/applications/simple-forms/mock-form-minimal-header/containers/App.jsx on lines 6..12
src/applications/simple-forms/mock-simple-forms-patterns/containers/App.jsx on lines 6..12
src/applications/travel-pay/containers/App.jsx on lines 6..12
src/applications/ask-a-question/App.jsx on lines 6..12
src/applications/edu-benefits/0993/Form0993App.jsx on lines 6..12
src/applications/edu-benefits/10203/Form10203App.jsx on lines 6..12

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

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

export default function App({ location, children }) {
  return (
    <RoutedSavableApp formConfig={formConfig} currentLocation={location}>
      {children}
    </RoutedSavableApp>
src/applications/_mock-form/containers/App.jsx on lines 6..12
src/applications/edu-benefits/10215/containers/App.jsx on lines 6..12
src/applications/edu-benefits/10216/containers/App.jsx on lines 6..12
src/applications/edu-benefits/1919/containers/App.jsx on lines 6..12
src/applications/edu-benefits/8794/containers/App.jsx on lines 6..12
src/applications/mock-sip-form/containers/App.jsx on lines 6..12
src/applications/personalization/review-information/containers/App.jsx on lines 6..12
src/applications/sah/sahg/containers/App.jsx on lines 6..12
src/applications/simple-forms/21-0845/containers/App.jsx on lines 9..15
src/applications/simple-forms/21-0966/containers/App.jsx on lines 6..12
src/applications/simple-forms/21-0972/containers/App.jsx on lines 9..15
src/applications/simple-forms/21-10210/containers/App.jsx on lines 7..13
src/applications/simple-forms/21-4142/containers/App.jsx on lines 6..12
src/applications/simple-forms/21P-0847/containers/App.jsx on lines 6..12
src/applications/simple-forms/26-4555/containers/App.jsx on lines 6..12
src/applications/simple-forms/40-0247/containers/App.jsx on lines 9..15
src/applications/simple-forms/mock-simple-forms-patterns/containers/App.jsx on lines 6..12
src/applications/travel-pay/containers/App.jsx on lines 6..12
src/applications/ask-a-question/App.jsx on lines 6..12
src/applications/edu-benefits/0993/Form0993App.jsx on lines 6..12
src/applications/edu-benefits/10203/Form10203App.jsx on lines 6..12

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

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

export const LIVING_SITUATIONS_3RD_PTY_NON_VET = Object.freeze({
  OVERNIGHT:
    'The claimant lives or sleeps overnight in a place that isn’t meant for regular sleeping. This includes a car, park, abandoned building, bus station, train station, airport, or camping ground.',
  SHELTER:
    'The claimant lives in a shelter (including a hotel or motel) that’s meant for temporary stays.',
Severity: Major
Found in src/applications/simple-forms/20-10207/config/constants.js and 9 other locations - About 55 mins to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 121..130
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 132..141
src/applications/simple-forms/20-10207/config/constants.js on lines 40..53
src/applications/simple-forms/20-10207/config/constants.js on lines 54..67
src/applications/simple-forms/20-10207/config/constants.js on lines 276..286
src/applications/simple-forms/20-10207/config/constants.js on lines 288..299
src/applications/simple-forms/20-10207/config/constants.js on lines 301..313
src/applications/simple-forms/21-4138/config/constants.js on lines 92..105
src/applications/disability-benefits/all-claims/constants.js on lines 369..377

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

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

export const characterOfDischargeTypeLabels = Object.freeze({
  HONORABLE: 'Honorable',
  UNDER_HONORABLE_CONDITIONS_GENERAL: 'Under Honorable Conditions (General)',
  UNDER_OTHER_THAN_HONORABLE_CONDITIONS:
    'Under Other Than Honorable Conditions',
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 121..130
src/applications/simple-forms/20-10207/config/constants.js on lines 40..53
src/applications/simple-forms/20-10207/config/constants.js on lines 54..67
src/applications/simple-forms/20-10207/config/constants.js on lines 68..81
src/applications/simple-forms/20-10207/config/constants.js on lines 276..286
src/applications/simple-forms/20-10207/config/constants.js on lines 288..299
src/applications/simple-forms/20-10207/config/constants.js on lines 301..313
src/applications/simple-forms/21-4138/config/constants.js on lines 92..105
src/applications/disability-benefits/all-claims/constants.js on lines 369..377

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

        areaOfDisagreementFollowUp: {
          title: getIssueTitle,
          path: 'area-of-disagreement/:index',
          CustomPage: AreaOfDisagreement,
          CustomPageReview: null,
Severity: Major
Found in src/applications/appeals/996/config/form.js and 2 other locations - About 55 mins to fix
src/applications/appeals/10182/config/form.js on lines 181..190
src/applications/appeals/testing/hlr/config/form.js on lines 170..179

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

        areaOfDisagreementFollowUp: {
          title: getIssueTitle,
          path: 'area-of-disagreement/:index',
          CustomPage: AreaOfDisagreement,
          CustomPageReview: null,
Severity: Major
Found in src/applications/appeals/testing/hlr/config/form.js and 2 other locations - About 55 mins to fix
src/applications/appeals/10182/config/form.js on lines 181..190
src/applications/appeals/996/config/form.js on lines 187..196

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

export const customText = {
  appType: 'request',
  appAction: 'your request',
  continueAppButtonText: 'Continue your request',
  startNewAppButtonText: 'Start a new request',
src/applications/_mock-form-ae-design-patterns/patterns/pattern1/TaskPurple/content/saveInProgress.js on lines 3..12
src/applications/appeals/10182/content/saveInProgress.js on lines 3..12

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

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

export const GULF_WAR_2001_LOCATIONS = Object.freeze({
  djibouti: 'Djibouti',
  lebanon: 'Lebanon',
  uzbekistan: 'Uzbekistan',
  yemen: 'Yemen',
Severity: Major
Found in src/applications/disability-benefits/all-claims/constants.js and 9 other locations - About 55 mins to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 121..130
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 132..141
src/applications/simple-forms/20-10207/config/constants.js on lines 40..53
src/applications/simple-forms/20-10207/config/constants.js on lines 54..67
src/applications/simple-forms/20-10207/config/constants.js on lines 68..81
src/applications/simple-forms/20-10207/config/constants.js on lines 276..286
src/applications/simple-forms/20-10207/config/constants.js on lines 288..299
src/applications/simple-forms/20-10207/config/constants.js on lines 301..313
src/applications/simple-forms/21-4138/config/constants.js on lines 92..105

Duplicated Code

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

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

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

Tuning

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

      try {
        location = await getPreciseLocation();
        recordEvent({
          event: `${GA_PREFIX}-request-current-location-allowed`,
        });
Severity: Major
Found in src/applications/vaos/new-appointment/redux/actions.js and 2 other locations - About 55 mins to fix
src/applications/vaos/covid-19-vaccine/redux/actions.js on lines 235..252
src/applications/vaos/new-appointment/redux/actions.js on lines 464..487

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

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

export const LIVING_SITUATIONS = Object.freeze({
  OVERNIGHT:
    'I live or sleep overnight in a place that isn’t meant for regular sleeping. This includes a car, park, abandoned building, bus station, train station, airport, or camping ground.',
  SHELTER:
    'I live in a shelter (including a hotel or motel) that’s meant for temporary stays.',
Severity: Major
Found in src/applications/simple-forms/21-4138/config/constants.js and 9 other locations - About 55 mins to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 121..130
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 132..141
src/applications/simple-forms/20-10207/config/constants.js on lines 40..53
src/applications/simple-forms/20-10207/config/constants.js on lines 54..67
src/applications/simple-forms/20-10207/config/constants.js on lines 68..81
src/applications/simple-forms/20-10207/config/constants.js on lines 276..286
src/applications/simple-forms/20-10207/config/constants.js on lines 288..299
src/applications/simple-forms/20-10207/config/constants.js on lines 301..313
src/applications/disability-benefits/all-claims/constants.js on lines 369..377

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

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

export const LIVING_SITUATIONS_3RD_PTY_VET = Object.freeze({
  OVERNIGHT:
    'The Veteran lives or sleeps overnight in a place that isn’t meant for regular sleeping. This includes a car, park, abandoned building, bus station, train station, airport, or camping ground.',
  SHELTER:
    'The Veteran lives in a shelter (including a hotel or motel) that’s meant for temporary stays.',
Severity: Major
Found in src/applications/simple-forms/20-10207/config/constants.js and 9 other locations - About 55 mins to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 121..130
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 132..141
src/applications/simple-forms/20-10207/config/constants.js on lines 40..53
src/applications/simple-forms/20-10207/config/constants.js on lines 68..81
src/applications/simple-forms/20-10207/config/constants.js on lines 276..286
src/applications/simple-forms/20-10207/config/constants.js on lines 288..299
src/applications/simple-forms/20-10207/config/constants.js on lines 301..313
src/applications/simple-forms/21-4138/config/constants.js on lines 92..105
src/applications/disability-benefits/all-claims/constants.js on lines 369..377

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

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

export const OTHER_REASONS = Object.freeze({
  FINANCIAL_HARDSHIP: 'I’m experiencing extreme financial hardship.',
  ALS:
    'I have ALS (amyotrophic lateral sclerosis), also known as Lou Gehrig’s disease.',
  TERMINAL_ILLNESS: 'I have a terminal illness.',
Severity: Major
Found in src/applications/simple-forms/20-10207/config/constants.js and 9 other locations - About 55 mins to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 121..130
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 132..141
src/applications/simple-forms/20-10207/config/constants.js on lines 40..53
src/applications/simple-forms/20-10207/config/constants.js on lines 54..67
src/applications/simple-forms/20-10207/config/constants.js on lines 68..81
src/applications/simple-forms/20-10207/config/constants.js on lines 288..299
src/applications/simple-forms/20-10207/config/constants.js on lines 301..313
src/applications/simple-forms/21-4138/config/constants.js on lines 92..105
src/applications/disability-benefits/all-claims/constants.js on lines 369..377

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

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

export const OTHER_REASONS_3RD_PTY_VET = Object.freeze({
  FINANCIAL_HARDSHIP: 'The Veteran is experiencing extreme financial hardship.',
  ALS:
    'The Veteran has ALS (amyotrophic lateral sclerosis), also known as Lou Gehrig’s disease.',
  TERMINAL_ILLNESS: 'The Veteran has a terminal illness.',
Severity: Major
Found in src/applications/simple-forms/20-10207/config/constants.js and 9 other locations - About 55 mins to fix
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 121..130
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 132..141
src/applications/simple-forms/20-10207/config/constants.js on lines 40..53
src/applications/simple-forms/20-10207/config/constants.js on lines 54..67
src/applications/simple-forms/20-10207/config/constants.js on lines 68..81
src/applications/simple-forms/20-10207/config/constants.js on lines 276..286
src/applications/simple-forms/20-10207/config/constants.js on lines 301..313
src/applications/simple-forms/21-4138/config/constants.js on lines 92..105
src/applications/disability-benefits/all-claims/constants.js on lines 369..377

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

      try {
        location = await getPreciseLocation();
        recordEvent({
          event: `${GA_PREFIX}-request-current-location-allowed`,
        });
Severity: Major
Found in src/applications/vaos/new-appointment/redux/actions.js and 2 other locations - About 55 mins to fix
src/applications/vaos/covid-19-vaccine/redux/actions.js on lines 235..252
src/applications/vaos/new-appointment/redux/actions.js on lines 412..429

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

export const deductionCodes = Object.freeze({
  '30': 'Disability compensation and pension debt',
  '41': 'Chapter 34 education debt',
  '44': 'Chapter 35 education debt',
  '71': 'Post-9/11 GI Bill debt for books and supplies',
src/applications/financial-status-report/constants/deduction-codes/index.js on lines 1..9
src/applications/personalization/dashboard/actions/debts.js on lines 14..22

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

      try {
        location = await getPreciseLocation();
        recordEvent({
          event: `${GA_PREFIX}-request-current-location-allowed`,
        });
Severity: Major
Found in src/applications/vaos/covid-19-vaccine/redux/actions.js and 2 other locations - About 55 mins to fix
src/applications/vaos/new-appointment/redux/actions.js on lines 412..429
src/applications/vaos/new-appointment/redux/actions.js on lines 464..487

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

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

export const characterOfDischargeTypes = Object.freeze({
  HONORABLE: 'HONORABLE',
  UNDER_HONORABLE_CONDITIONS_GENERAL: 'UNDER_HONORABLE_CONDITIONS_GENERAL',
  UNDER_OTHER_THAN_HONORABLE_CONDITIONS:
    'UNDER_OTHER_THAN_HONORABLE_CONDITIONS',
src/applications/benefit-eligibility-questionnaire/constants/benefits.js on lines 132..141
src/applications/simple-forms/20-10207/config/constants.js on lines 40..53
src/applications/simple-forms/20-10207/config/constants.js on lines 54..67
src/applications/simple-forms/20-10207/config/constants.js on lines 68..81
src/applications/simple-forms/20-10207/config/constants.js on lines 276..286
src/applications/simple-forms/20-10207/config/constants.js on lines 288..299
src/applications/simple-forms/20-10207/config/constants.js on lines 301..313
src/applications/simple-forms/21-4138/config/constants.js on lines 92..105
src/applications/disability-benefits/all-claims/constants.js on lines 369..377

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

export const deductionCodes = Object.freeze({
  '30': 'Disability compensation and pension debt',
  '41': 'Chapter 34 education debt',
  '44': 'Chapter 35 education debt',
  '71': 'Post-9/11 GI Bill debt for books and supplies',
src/applications/combined-debt-portal/debt-letters/const/deduction-codes/index.js on lines 3..11
src/applications/personalization/dashboard/actions/debts.js on lines 14..22

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

Severity
Category
Status
Source
Language