department-of-veterans-affairs/vets-website

View on GitHub
src/applications/edu-benefits/utils/labels.jsx

Summary

Maintainability
D
2 days
Test Coverage

File labels.jsx has 319 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';

import { states } from 'platform/forms/address';
import { createUSAStateLabels } from 'platform/forms-system/src/js/helpers';

Severity: Minor
Found in src/applications/edu-benefits/utils/labels.jsx - About 3 hrs to fix

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

    export const bankInfoHelpText = (
      <va-additional-info
        trigger="What if I don’t have a bank account?"
        onClick={gaBankInfoHelpText}
      >
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 1 other location - About 3 hrs to fix
    src/applications/edu-benefits/0994/content/bankInformation.jsx on lines 22..46

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

    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

      chapter32: (
        <p>
          Post-Vietnam Era Veterans’ Educational Assistance Program
          <br />
          (VEAP, Chapter 32)
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 1 other location - About 1 hr to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 70..84

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

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

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

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

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

    Refactorings

    Further Reading

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

      fryScholarship: (
        <p>
          Fry Scholarship (Chapter 33)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 2 other locations - About 55 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 39..51

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

      fryScholarship: (
        <p>
          Fry Scholarship (Chapter 33)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 2 other locations - About 55 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 130..142

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

      chapter1606: (
        <p>
          Montgomery GI Bill Selected Reserve (MGIB-SR, Chapter 1606)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 52..64
    src/applications/edu-benefits/utils/labels.jsx on lines 65..77
    src/applications/edu-benefits/utils/labels.jsx on lines 93..105
    src/applications/edu-benefits/utils/labels.jsx on lines 109..121
    src/applications/edu-benefits/utils/labels.jsx on lines 143..155
    src/applications/edu-benefits/utils/labels.jsx on lines 169..181
    src/applications/edu-benefits/utils/labels.jsx on lines 182..193

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

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

      chapter30: (
        <p>
          Montgomery GI Bill (MGIB-AD, Chapter 30)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 65..77
    src/applications/edu-benefits/utils/labels.jsx on lines 93..105
    src/applications/edu-benefits/utils/labels.jsx on lines 109..121
    src/applications/edu-benefits/utils/labels.jsx on lines 143..155
    src/applications/edu-benefits/utils/labels.jsx on lines 156..168
    src/applications/edu-benefits/utils/labels.jsx on lines 169..181
    src/applications/edu-benefits/utils/labels.jsx on lines 182..193

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

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

      chapter35: (
        <p>
          Survivors' and Dependents’ Education Assistance (DEA, Chapter 35 )<br />
          <a
            aria-label="Learn more about Survivors’ and Dependents’ Educational Assistance"
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 52..64
    src/applications/edu-benefits/utils/labels.jsx on lines 65..77
    src/applications/edu-benefits/utils/labels.jsx on lines 93..105
    src/applications/edu-benefits/utils/labels.jsx on lines 109..121
    src/applications/edu-benefits/utils/labels.jsx on lines 143..155
    src/applications/edu-benefits/utils/labels.jsx on lines 156..168
    src/applications/edu-benefits/utils/labels.jsx on lines 169..181

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

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

      chapter33: (
        <p>
          Post-9/11 GI Bill (Chapter 33)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 52..64
    src/applications/edu-benefits/utils/labels.jsx on lines 65..77
    src/applications/edu-benefits/utils/labels.jsx on lines 93..105
    src/applications/edu-benefits/utils/labels.jsx on lines 109..121
    src/applications/edu-benefits/utils/labels.jsx on lines 143..155
    src/applications/edu-benefits/utils/labels.jsx on lines 156..168
    src/applications/edu-benefits/utils/labels.jsx on lines 169..181
    src/applications/edu-benefits/utils/labels.jsx on lines 182..193

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

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

      chapter30: (
        <p>
          Montgomery GI Bill (MGIB-AD, Chapter 30)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 52..64
    src/applications/edu-benefits/utils/labels.jsx on lines 65..77
    src/applications/edu-benefits/utils/labels.jsx on lines 93..105
    src/applications/edu-benefits/utils/labels.jsx on lines 109..121
    src/applications/edu-benefits/utils/labels.jsx on lines 156..168
    src/applications/edu-benefits/utils/labels.jsx on lines 169..181
    src/applications/edu-benefits/utils/labels.jsx on lines 182..193

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

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

      chapter33: (
        <p>
          Post-9/11 GI Bill (Chapter 33)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 52..64
    src/applications/edu-benefits/utils/labels.jsx on lines 65..77
    src/applications/edu-benefits/utils/labels.jsx on lines 93..105
    src/applications/edu-benefits/utils/labels.jsx on lines 143..155
    src/applications/edu-benefits/utils/labels.jsx on lines 156..168
    src/applications/edu-benefits/utils/labels.jsx on lines 169..181
    src/applications/edu-benefits/utils/labels.jsx on lines 182..193

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

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

      chapter1606: (
        <p>
          Montgomery GI Bill Selected Reserve (MGIB-SR, Chapter 1606)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 52..64
    src/applications/edu-benefits/utils/labels.jsx on lines 93..105
    src/applications/edu-benefits/utils/labels.jsx on lines 109..121
    src/applications/edu-benefits/utils/labels.jsx on lines 143..155
    src/applications/edu-benefits/utils/labels.jsx on lines 156..168
    src/applications/edu-benefits/utils/labels.jsx on lines 169..181
    src/applications/edu-benefits/utils/labels.jsx on lines 182..193

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

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

      transferOfEntitlement: (
        <p>
          Transfer of Entitlement Program (TOE)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 52..64
    src/applications/edu-benefits/utils/labels.jsx on lines 65..77
    src/applications/edu-benefits/utils/labels.jsx on lines 93..105
    src/applications/edu-benefits/utils/labels.jsx on lines 109..121
    src/applications/edu-benefits/utils/labels.jsx on lines 143..155
    src/applications/edu-benefits/utils/labels.jsx on lines 156..168
    src/applications/edu-benefits/utils/labels.jsx on lines 182..193

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

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

      transferOfEntitlement: (
        <p>
          Transfer of Entitlement Program (TOE)
          <br />
          <a
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 12 other locations - About 50 mins to fix
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 4..16
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 31..43
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 44..56
    src/applications/edu-benefits/10203/content/benefitSelection.jsx on lines 57..69
    src/applications/edu-benefits/utils/labels.jsx on lines 18..30
    src/applications/edu-benefits/utils/labels.jsx on lines 52..64
    src/applications/edu-benefits/utils/labels.jsx on lines 65..77
    src/applications/edu-benefits/utils/labels.jsx on lines 109..121
    src/applications/edu-benefits/utils/labels.jsx on lines 143..155
    src/applications/edu-benefits/utils/labels.jsx on lines 156..168
    src/applications/edu-benefits/utils/labels.jsx on lines 169..181
    src/applications/edu-benefits/utils/labels.jsx on lines 182..193

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

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

    export const chapterNames = {
      veteranInformation: 'Veteran Information',
      benefitsEligibility: 'Benefits Eligibility',
      militaryHistory: 'Military History',
      educationHistory: 'Education History',
    Severity: Major
    Found in src/applications/edu-benefits/utils/labels.jsx and 10 other locations - About 50 mins to fix
    src/applications/appeals/995/content/primaryPhone.js on lines 1..11
    src/applications/appeals/testing/sc/content/primaryPhone.js on lines 1..11
    src/applications/disability-benefits/686c-674/config/constants.js on lines 7..17
    src/applications/disability-benefits/wizard/pages/pageList.js on lines 1..10
    src/applications/mhv-secure-messaging/util/constants.js on lines 287..296
    src/applications/simple-forms/21-4142/definitions/constants.js on lines 29..38
    src/applications/vre/28-1900/wizard/pages/pageList.js on lines 14..23
    src/applications/pensions/labels.jsx on lines 32..41
    src/applications/static-pages/cta-widget/constants.js on lines 3..12
    src/applications/static-pages/wizard/index.js on lines 23..32

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 51.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status