department-of-veterans-affairs/vets-website

View on GitHub
src/applications/simple-forms/20-10207/config/form.js

Summary

Maintainability
F
1 wk
Test Coverage

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

// we're not using JSON schema for this form
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import footerContent from 'platform/forms/components/FormFooter';
import getHelp from '../../shared/components/GetFormHelp';

Severity: Major
Found in src/applications/simple-forms/20-10207/config/form.js - About 1 day to fix

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

            veteranMailingAddressThirdPartyVeteranPage: {
              depends: formData =>
                (formData.mailingAddressYesNo || formData.livingSituation.NONE) &&
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN,
              path: 'veteran-mailing-address-third-party-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 289..298
    src/applications/simple-forms/20-10207/config/form.js on lines 299..308
    src/applications/simple-forms/20-10207/config/form.js on lines 319..328

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

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

            nonVeteranMailingAddressPage: {
              depends: formData =>
                (formData.mailingAddressYesNo || formData.livingSituation.NONE) &&
                formData.preparerType === PREPARER_TYPES.NON_VETERAN,
              path: 'non-veteran-mailing-address',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 289..298
    src/applications/simple-forms/20-10207/config/form.js on lines 309..318
    src/applications/simple-forms/20-10207/config/form.js on lines 319..328

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

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

            veteranMailingAddressPage: {
              depends: formData =>
                (formData.mailingAddressYesNo || formData.livingSituation.NONE) &&
                formData.preparerType === PREPARER_TYPES.VETERAN,
              path: 'veteran-mailing-address',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 299..308
    src/applications/simple-forms/20-10207/config/form.js on lines 309..318
    src/applications/simple-forms/20-10207/config/form.js on lines 319..328

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

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

            nonVeteranMailingAddressThirdPartyNonVeteranPage: {
              depends: formData =>
                (formData.mailingAddressYesNo || formData.livingSituation.NONE) &&
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'non-veteran-mailing-address-third-party-non-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 289..298
    src/applications/simple-forms/20-10207/config/form.js on lines 299..308
    src/applications/simple-forms/20-10207/config/form.js on lines 309..318

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

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

            nonVeteranPhoneAndEmailPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.NON_VETERAN ||
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'non-veteran-phone-and-email',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 149..158
    src/applications/simple-forms/20-10207/config/form.js on lines 159..168
    src/applications/simple-forms/20-10207/config/form.js on lines 169..178
    src/applications/simple-forms/20-10207/config/form.js on lines 179..188
    src/applications/simple-forms/20-10207/config/form.js on lines 194..203
    src/applications/simple-forms/20-10207/config/form.js on lines 329..338
    src/applications/simple-forms/20-10207/config/form.js on lines 386..395
    src/applications/simple-forms/20-10207/config/form.js on lines 396..405

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

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

            veteranPhoneAndEmailPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.VETERAN ||
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN,
              path: 'veteran-phone-and-email',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 149..158
    src/applications/simple-forms/20-10207/config/form.js on lines 159..168
    src/applications/simple-forms/20-10207/config/form.js on lines 169..178
    src/applications/simple-forms/20-10207/config/form.js on lines 179..188
    src/applications/simple-forms/20-10207/config/form.js on lines 194..203
    src/applications/simple-forms/20-10207/config/form.js on lines 339..348
    src/applications/simple-forms/20-10207/config/form.js on lines 386..395
    src/applications/simple-forms/20-10207/config/form.js on lines 396..405

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

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

            veteranIdentificationInformationPageB: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.NON_VETERAN ||
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'veteran-identification-information-b',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 149..158
    src/applications/simple-forms/20-10207/config/form.js on lines 159..168
    src/applications/simple-forms/20-10207/config/form.js on lines 169..178
    src/applications/simple-forms/20-10207/config/form.js on lines 179..188
    src/applications/simple-forms/20-10207/config/form.js on lines 194..203
    src/applications/simple-forms/20-10207/config/form.js on lines 329..338
    src/applications/simple-forms/20-10207/config/form.js on lines 339..348
    src/applications/simple-forms/20-10207/config/form.js on lines 386..395

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

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

            nonVeteranNameAndDateOfBirthPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.NON_VETERAN ||
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'non-veteran-name-and-date-of-birth',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 149..158
    src/applications/simple-forms/20-10207/config/form.js on lines 169..178
    src/applications/simple-forms/20-10207/config/form.js on lines 179..188
    src/applications/simple-forms/20-10207/config/form.js on lines 194..203
    src/applications/simple-forms/20-10207/config/form.js on lines 329..338
    src/applications/simple-forms/20-10207/config/form.js on lines 339..348
    src/applications/simple-forms/20-10207/config/form.js on lines 386..395
    src/applications/simple-forms/20-10207/config/form.js on lines 396..405

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

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

            veteranNameAndDateOfBirthPageB: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.NON_VETERAN ||
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'veteran-name-and-date-of-birth-b',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 149..158
    src/applications/simple-forms/20-10207/config/form.js on lines 159..168
    src/applications/simple-forms/20-10207/config/form.js on lines 169..178
    src/applications/simple-forms/20-10207/config/form.js on lines 179..188
    src/applications/simple-forms/20-10207/config/form.js on lines 194..203
    src/applications/simple-forms/20-10207/config/form.js on lines 329..338
    src/applications/simple-forms/20-10207/config/form.js on lines 339..348
    src/applications/simple-forms/20-10207/config/form.js on lines 396..405

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

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

            veteranIdentificationInformationPageA: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.VETERAN ||
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN,
              path: 'veteran-identification-information-a',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 149..158
    src/applications/simple-forms/20-10207/config/form.js on lines 159..168
    src/applications/simple-forms/20-10207/config/form.js on lines 179..188
    src/applications/simple-forms/20-10207/config/form.js on lines 194..203
    src/applications/simple-forms/20-10207/config/form.js on lines 329..338
    src/applications/simple-forms/20-10207/config/form.js on lines 339..348
    src/applications/simple-forms/20-10207/config/form.js on lines 386..395
    src/applications/simple-forms/20-10207/config/form.js on lines 396..405

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

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

            nonVeteranIdentificationInformationPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.NON_VETERAN ||
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'non-veteran-identification-information',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 149..158
    src/applications/simple-forms/20-10207/config/form.js on lines 159..168
    src/applications/simple-forms/20-10207/config/form.js on lines 169..178
    src/applications/simple-forms/20-10207/config/form.js on lines 194..203
    src/applications/simple-forms/20-10207/config/form.js on lines 329..338
    src/applications/simple-forms/20-10207/config/form.js on lines 339..348
    src/applications/simple-forms/20-10207/config/form.js on lines 386..395
    src/applications/simple-forms/20-10207/config/form.js on lines 396..405

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

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

            veteranNameAndDateOfBirthPageA: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.VETERAN ||
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN,
              path: 'veteran-name-and-date-of-birth-a',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 159..168
    src/applications/simple-forms/20-10207/config/form.js on lines 169..178
    src/applications/simple-forms/20-10207/config/form.js on lines 179..188
    src/applications/simple-forms/20-10207/config/form.js on lines 194..203
    src/applications/simple-forms/20-10207/config/form.js on lines 329..338
    src/applications/simple-forms/20-10207/config/form.js on lines 339..348
    src/applications/simple-forms/20-10207/config/form.js on lines 386..395
    src/applications/simple-forms/20-10207/config/form.js on lines 396..405

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

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

            livingSituationPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.VETERAN ||
                formData.preparerType === PREPARER_TYPES.NON_VETERAN,
              path: 'living-situation',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 8 other locations - About 2 hrs to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 149..158
    src/applications/simple-forms/20-10207/config/form.js on lines 159..168
    src/applications/simple-forms/20-10207/config/form.js on lines 169..178
    src/applications/simple-forms/20-10207/config/form.js on lines 179..188
    src/applications/simple-forms/20-10207/config/form.js on lines 329..338
    src/applications/simple-forms/20-10207/config/form.js on lines 339..348
    src/applications/simple-forms/20-10207/config/form.js on lines 386..395
    src/applications/simple-forms/20-10207/config/form.js on lines 396..405

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

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

            veteranPointOfContactPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN &&
                !formData.livingSituation.NONE,
              path: 'veteran-point-of-contact',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 371..380
    src/applications/simple-forms/20-10207/config/form.js on lines 453..462
    src/applications/simple-forms/20-10207/config/form.js on lines 463..472

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

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

            nonVeteranPointOfContactPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN &&
                !formData.livingSituation.NONE,
              path: 'non-veteran-point-of-contact',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 361..370
    src/applications/simple-forms/20-10207/config/form.js on lines 453..462
    src/applications/simple-forms/20-10207/config/form.js on lines 463..472

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

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

            otherReasonsHomelessThirdPartyVeteranPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN &&
                !formData.livingSituation.NONE,
              path: 'other-reasons-homeless-third-party-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 361..370
    src/applications/simple-forms/20-10207/config/form.js on lines 371..380
    src/applications/simple-forms/20-10207/config/form.js on lines 463..472

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

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

            otherReasonsHomelessThirdPartyNonVeteranPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN &&
                !formData.livingSituation.NONE,
              path: 'other-reasons-homeless-third-party-non-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 361..370
    src/applications/simple-forms/20-10207/config/form.js on lines 371..380
    src/applications/simple-forms/20-10207/config/form.js on lines 453..462

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

    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

            mailingAddressYesNoThirdPartyVeteranPage: {
              depends: formData =>
                !formData.livingSituation.NONE &&
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN,
              path: 'mailing-address-yes-no-third-party-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 1 other location - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 279..288

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

    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

            mailingAddressYesNoThirdPartyNonVeteranPage: {
              depends: formData =>
                !formData.livingSituation.NONE &&
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'mailing-address-yes-no-third-party-non-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 1 other location - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 269..278

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

    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

            otherHousingRiskThirdPartyNonVeteranPage: {
              depends: formData =>
                formData.livingSituation.OTHER_RISK &&
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'other-housing-risks-third-party-non-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 1 other location - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 233..242

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

    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

            otherReasonsThirdPartyVeteranPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN &&
                formData.livingSituation.NONE,
              path: 'other-reasons-third-party-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 1 other location - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 432..441

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

    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

            otherHousingRiskThirdPartyVeteranPage: {
              depends: formData =>
                formData.livingSituation.OTHER_RISK &&
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN,
              path: 'other-housing-risks-third-party-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 1 other location - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 243..252

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

    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

            otherReasonsThirdPartyNonVeteranPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN &&
                formData.livingSituation.NONE,
              path: 'other-reasons-third-party-non-veteran',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 1 other location - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 422..431

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

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

            thirdPartyVeteranIdentityPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN,
              path: 'third-party-veteran-identity',
              title: 'Name and third-party type',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 135..143
    src/applications/simple-forms/20-10207/config/form.js on lines 204..212
    src/applications/simple-forms/20-10207/config/form.js on lines 213..221

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

            livingSituationThirdPartyNonVeteranPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'living-situation-third-party-non-veteran',
              title: 'Claimant’s living situation',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 126..134
    src/applications/simple-forms/20-10207/config/form.js on lines 135..143
    src/applications/simple-forms/20-10207/config/form.js on lines 204..212

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

            thirdPartyNonVeteranIdentityPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_NON_VETERAN,
              path: 'third-party-non-veteran-identity',
              title: 'Name and third-party type',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 126..134
    src/applications/simple-forms/20-10207/config/form.js on lines 204..212
    src/applications/simple-forms/20-10207/config/form.js on lines 213..221

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

            livingSituationThirdPartyVeteranPage: {
              depends: formData =>
                formData.preparerType === PREPARER_TYPES.THIRD_PARTY_VETERAN,
              path: 'living-situation-third-party-veteran',
              title: 'Veteran’s living situation',
    Severity: Major
    Found in src/applications/simple-forms/20-10207/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/simple-forms/20-10207/config/form.js on lines 126..134
    src/applications/simple-forms/20-10207/config/form.js on lines 135..143
    src/applications/simple-forms/20-10207/config/form.js on lines 213..221

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

            financialHardshipPage: {
              depends: formData => formData.otherReasons?.FINANCIAL_HARDSHIP,
              path: 'evidence-financial-hardship',
              title: 'Upload evidence for extreme financial hardship',
              uiSchema: financialHardshipPg.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 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
    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

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

            terminalIllnessPage: {
              depends: formData => formData.otherReasons?.TERMINAL_ILLNESS,
              path: 'evidence-terminal-illness',
              title: 'Upload evidence for terminal illness',
              uiSchema: terminalIllnessPg.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 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
    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

            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

    There are no issues that match your filters.

    Category
    Status