department-of-veterans-affairs/vets-website

View on GitHub
src/applications/disability-benefits/all-claims/config/form.js

Summary

Maintainability
F
3 days
Test Coverage

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

import fullSchema from 'vets-json-schema/dist/21-526EZ-ALLCLAIMS-schema.json';

import environment from '@department-of-veterans-affairs/platform-utilities/environment';

import FormFooter from '@department-of-veterans-affairs/platform-forms/FormFooter';
Severity: Major
Found in src/applications/disability-benefits/all-claims/config/form.js - About 1 day to fix

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

            trainingPay: {
              title: 'Training pay',
              path: 'training-pay',
              depends: formData =>
                !hasRatedDisabilities(formData) && !isBDD(formData),
    src/applications/disability-benefits/all-claims/config/form.js on lines 271..278
    src/applications/disability-benefits/all-claims/config/form.js on lines 279..286
    src/applications/pre-need-integration/config/form.jsx on lines 519..526

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

    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

            retirementPay: {
              title: 'Retirement pay',
              path: 'retirement-pay',
              depends: formData =>
                !hasRatedDisabilities(formData) && !isBDD(formData),
    src/applications/disability-benefits/all-claims/config/form.js on lines 271..278
    src/applications/disability-benefits/all-claims/config/form.js on lines 287..294
    src/applications/pre-need-integration/config/form.jsx on lines 519..526

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

    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

            separationPay: {
              title: 'Separation or severance pay',
              path: 'separation-pay',
              depends: formData =>
                !hasRatedDisabilities(formData) && !isBDD(formData),
    src/applications/disability-benefits/all-claims/config/form.js on lines 279..286
    src/applications/disability-benefits/all-claims/config/form.js on lines 287..294
    src/applications/pre-need-integration/config/form.jsx on lines 519..526

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

    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

            privateMedicalRecordsAttachments: {
              title: 'Private medical records',
              path: 'supporting-evidence/private-medical-records-upload',
              depends: formData =>
                hasPrivateEvidence(formData) &&
    src/applications/pre-need-integration/config/form.jsx on lines 449..456
    src/applications/pre-need-integration/config/form.jsx on lines 502..510

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

    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

            uploadPtsdDocuments781: {
              title: 'Upload PTSD documents - 781',
              path: 'new-disabilities/ptsd-781-upload',
              depends: formData =>
                needsToEnter781(formData) && isUploading781Form(formData),
    src/applications/disability-benefits/all-claims/config/form.js on lines 472..479

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

    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

            uploadPtsdDocuments781a: {
              title: 'Upload PTSD documents - 781a',
              path: 'new-disabilities/ptsd-781a-upload',
              depends: formData =>
                needsToEnter781a(formData) && isUploading781aForm(formData),
    src/applications/disability-benefits/all-claims/config/form.js on lines 436..443

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

    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

            privateMedicalRecordsRelease: {
              title: 'Private medical records',
              path: 'supporting-evidence/private-medical-records-release',
              depends: formData =>
                hasPrivateEvidence(formData) &&
    src/applications/pre-need-integration/config/form.jsx on lines 457..464
    src/applications/pre-need-integration/config/form.jsx on lines 476..483
    src/applications/pre-need-integration/config/form.jsx on lines 511..518

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

    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

            evidenceTypes: {
              title: 'Supporting evidence types',
              path: 'supporting-evidence/evidence-types',
              depends: formData => !isBDD(formData),
              uiSchema: evidenceTypes.uiSchema,
    src/applications/disability-benefits/all-claims/config/form.js on lines 216..222
    src/applications/disability-benefits/all-claims/config/form.js on lines 223..229
    src/applications/pre-need-integration/config/form.jsx on lines 394..400
    src/applications/pre-need-integration/config/form.jsx on lines 428..434
    src/applications/pre-need-integration/config/form.jsx on lines 535..541
    src/applications/pre-need/config/form.jsx on lines 192..198
    src/applications/pre-need/config/form.jsx on lines 218..224
    src/applications/pre-need/config/form.jsx on lines 225..231
    src/applications/pre-need/config/form.jsx on lines 245..251
    src/applications/pre-need/config/form.jsx on lines 280..286

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

    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

            alternateNames: {
              title: 'Service under another name',
              path: 'alternate-names',
              depends: formData => !hasRatedDisabilities(formData),
              uiSchema: alternateNames.uiSchema,
    src/applications/disability-benefits/all-claims/config/form.js on lines 216..222
    src/applications/disability-benefits/all-claims/config/form.js on lines 636..642
    src/applications/pre-need-integration/config/form.jsx on lines 394..400
    src/applications/pre-need-integration/config/form.jsx on lines 428..434
    src/applications/pre-need-integration/config/form.jsx on lines 535..541
    src/applications/pre-need/config/form.jsx on lines 192..198
    src/applications/pre-need/config/form.jsx on lines 218..224
    src/applications/pre-need/config/form.jsx on lines 225..231
    src/applications/pre-need/config/form.jsx on lines 245..251
    src/applications/pre-need/config/form.jsx on lines 280..286

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

    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

            terminallyIll: {
              title: 'Terminally ill',
              path: 'terminally-ill',
              depends: formData => !isBDD(formData),
              uiSchema: terminallyIll.uiSchema,
    src/applications/disability-benefits/all-claims/config/form.js on lines 223..229
    src/applications/disability-benefits/all-claims/config/form.js on lines 636..642
    src/applications/pre-need-integration/config/form.jsx on lines 394..400
    src/applications/pre-need-integration/config/form.jsx on lines 428..434
    src/applications/pre-need-integration/config/form.jsx on lines 535..541
    src/applications/pre-need/config/form.jsx on lines 192..198
    src/applications/pre-need/config/form.jsx on lines 218..224
    src/applications/pre-need/config/form.jsx on lines 225..231
    src/applications/pre-need/config/form.jsx on lines 245..251
    src/applications/pre-need/config/form.jsx on lines 280..286

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

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

            fullyDevelopedClaim: {
              title: 'Fully developed claim program',
              path: 'fully-developed-claim',
              uiSchema: fullyDevelopedClaim.uiSchema,
              schema: fullyDevelopedClaim.schema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 4 other locations - About 40 mins to fix
    src/applications/financial-status-report/config/chapters/householdAssetsChapter.js on lines 146..152
    src/applications/financial-status-report/config/chapters/householdAssetsChapter.js on lines 178..184
    src/applications/financial-status-report/config/chapters/householdExpensesChapter.js on lines 117..123
    src/applications/financial-status-report/config/chapters/householdExpensesChapter.js on lines 149..155

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

    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

            evidenceTypesBDD: {
              title: 'Supporting evidence types for BDD',
              path: 'supporting-evidence/evidence-types-bdd',
              depends: formData => isBDD(formData),
              uiSchema: evidenceTypesBDD.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 8 other locations - About 35 mins to fix
    src/applications/disability-benefits/all-claims/config/8940/index.js on lines 186..192
    src/applications/disability-benefits/all-claims/config/form.js on lines 622..628
    src/applications/disability-benefits/all-claims/config/form.js on lines 629..635
    src/applications/disability-benefits/all-claims/config/form.js on lines 650..656
    src/applications/pre-need-integration/config/form.jsx on lines 560..566
    src/applications/pre-need/config/form.jsx on lines 273..279
    src/applications/pre-need/config/form.jsx on lines 293..299
    src/applications/pre-need/config/form.jsx on lines 310..316

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

    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

            vaMedicalRecords: {
              title: 'VA medical records',
              path: 'supporting-evidence/va-medical-records',
              depends: formData => hasVAEvidence(formData),
              uiSchema: vaMedicalRecords.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 8 other locations - About 35 mins to fix
    src/applications/disability-benefits/all-claims/config/8940/index.js on lines 186..192
    src/applications/disability-benefits/all-claims/config/form.js on lines 622..628
    src/applications/disability-benefits/all-claims/config/form.js on lines 629..635
    src/applications/disability-benefits/all-claims/config/form.js on lines 643..649
    src/applications/pre-need-integration/config/form.jsx on lines 560..566
    src/applications/pre-need/config/form.jsx on lines 273..279
    src/applications/pre-need/config/form.jsx on lines 293..299
    src/applications/pre-need/config/form.jsx on lines 310..316

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

    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

            serviceTreatmentRecords: {
              title: 'Service treatment records',
              path: 'supporting-evidence/service-treatment-records',
              depends: formData => isBDD(formData),
              uiSchema: serviceTreatmentRecords.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 8 other locations - About 35 mins to fix
    src/applications/disability-benefits/all-claims/config/8940/index.js on lines 186..192
    src/applications/disability-benefits/all-claims/config/form.js on lines 629..635
    src/applications/disability-benefits/all-claims/config/form.js on lines 643..649
    src/applications/disability-benefits/all-claims/config/form.js on lines 650..656
    src/applications/pre-need-integration/config/form.jsx on lines 560..566
    src/applications/pre-need/config/form.jsx on lines 273..279
    src/applications/pre-need/config/form.jsx on lines 293..299
    src/applications/pre-need/config/form.jsx on lines 310..316

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

    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

            serviceTreatmentRecordsAttachments: {
              title: 'Service treatment records upload',
              path: 'supporting-evidence/service-treatment-records-upload',
              depends: formData => isUploadingSTR(formData),
              uiSchema: serviceTreatmentRecordsAttachments.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 8 other locations - About 35 mins to fix
    src/applications/disability-benefits/all-claims/config/8940/index.js on lines 186..192
    src/applications/disability-benefits/all-claims/config/form.js on lines 622..628
    src/applications/disability-benefits/all-claims/config/form.js on lines 643..649
    src/applications/disability-benefits/all-claims/config/form.js on lines 650..656
    src/applications/pre-need-integration/config/form.jsx on lines 560..566
    src/applications/pre-need/config/form.jsx on lines 273..279
    src/applications/pre-need/config/form.jsx on lines 293..299
    src/applications/pre-need/config/form.jsx on lines 310..316

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

    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

            adaptiveBenefits: {
              title: 'Automobile allowance and adaptive benefits',
              path: 'adaptive-benefits',
              depends: formData => formData['view:ancillaryFormsWizard'],
              uiSchema: adaptiveBenefits.uiSchema,
    Severity: Minor
    Found in src/applications/disability-benefits/all-claims/config/form.js and 2 other locations - About 35 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 579..585
    src/applications/disability-benefits/all-claims/config/form.js on lines 586..592

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

    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

            individualUnemployability: {
              title: 'Individual Unemployability',
              path: 'individual-unemployability',
              depends: formData => formData['view:ancillaryFormsWizard'],
              uiSchema: individualUnemployability.uiSchema,
    Severity: Minor
    Found in src/applications/disability-benefits/all-claims/config/form.js and 2 other locations - About 35 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 572..578
    src/applications/disability-benefits/all-claims/config/form.js on lines 579..585

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

    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

            aidAndAttendance: {
              title: 'Aid and attendance benefits',
              path: 'aid-and-attendance',
              depends: formData => formData['view:ancillaryFormsWizard'],
              uiSchema: aidAndAttendance.uiSchema,
    Severity: Minor
    Found in src/applications/disability-benefits/all-claims/config/form.js and 2 other locations - About 35 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 572..578
    src/applications/disability-benefits/all-claims/config/form.js on lines 586..592

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

    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

            additionalBehaviorChanges: {
              title: 'Additional changes in behavior - more information',
              path: 'new-disabilities/ptsd-781a-additional-changes',
              depends: isAnswering781aQuestions(0),
              uiSchema: additionalBehaviorChanges.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 5 other locations - About 30 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 453..459
    src/applications/disability-benefits/all-claims/config/form.js on lines 496..502
    src/applications/disability-benefits/all-claims/config/form.js on lines 504..510
    src/applications/disability-benefits/all-claims/config/form.js on lines 512..518
    src/applications/disability-benefits/all-claims/config/form.js on lines 520..526

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

    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

            mentalHealthChanges: {
              title: 'Additional changes in behavior - mental/substance abuse',
              path: 'new-disabilities/ptsd-781a-mental-changes',
              depends: isAnswering781aQuestions(0),
              uiSchema: mentalHealthChanges.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 5 other locations - About 30 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 453..459
    src/applications/disability-benefits/all-claims/config/form.js on lines 496..502
    src/applications/disability-benefits/all-claims/config/form.js on lines 512..518
    src/applications/disability-benefits/all-claims/config/form.js on lines 520..526
    src/applications/disability-benefits/all-claims/config/form.js on lines 528..534

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

    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

            socialBehaviorChanges: {
              title: 'Additional changes in behavior - social',
              path: 'new-disabilities/ptsd-781a-social-changes',
              depends: isAnswering781aQuestions(0),
              uiSchema: socialBehaviorChanges.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 5 other locations - About 30 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 453..459
    src/applications/disability-benefits/all-claims/config/form.js on lines 496..502
    src/applications/disability-benefits/all-claims/config/form.js on lines 504..510
    src/applications/disability-benefits/all-claims/config/form.js on lines 512..518
    src/applications/disability-benefits/all-claims/config/form.js on lines 528..534

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

    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

            physicalHealthChanges: {
              title: 'Additional changes in behavior - physical',
              path: 'new-disabilities/ptsd-781a-physical-changes',
              depends: isAnswering781aQuestions(0),
              uiSchema: physicalHealthChanges.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 5 other locations - About 30 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 453..459
    src/applications/disability-benefits/all-claims/config/form.js on lines 504..510
    src/applications/disability-benefits/all-claims/config/form.js on lines 512..518
    src/applications/disability-benefits/all-claims/config/form.js on lines 520..526
    src/applications/disability-benefits/all-claims/config/form.js on lines 528..534

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

    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

            workBehaviorChanges: {
              title: 'Additional changes in behavior - work',
              path: 'new-disabilities/ptsd-781a-work-changes',
              depends: isAnswering781aQuestions(0),
              uiSchema: workBehaviorChanges.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 5 other locations - About 30 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 453..459
    src/applications/disability-benefits/all-claims/config/form.js on lines 496..502
    src/applications/disability-benefits/all-claims/config/form.js on lines 504..510
    src/applications/disability-benefits/all-claims/config/form.js on lines 520..526
    src/applications/disability-benefits/all-claims/config/form.js on lines 528..534

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

    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

            additionalRemarks781: {
              title: 'Additional remarks',
              path: 'new-disabilities/additional-remarks-781',
              depends: isAnswering781Questions(0),
              uiSchema: additionalRemarks781.uiSchema,
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/form.js and 5 other locations - About 30 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 496..502
    src/applications/disability-benefits/all-claims/config/form.js on lines 504..510
    src/applications/disability-benefits/all-claims/config/form.js on lines 512..518
    src/applications/disability-benefits/all-claims/config/form.js on lines 520..526
    src/applications/disability-benefits/all-claims/config/form.js on lines 528..534

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

    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

            finalIncident: {
              path: 'new-disabilities/ptsd-additional-incident',
              title: 'Additional PTSD event',
              depends: isAnswering781Questions(PTSD_INCIDENT_ITERATION),
              uiSchema: finalIncident.uiSchema,
    Severity: Minor
    Found in src/applications/disability-benefits/all-claims/config/form.js and 1 other location - About 30 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 481..487

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

    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

            secondaryFinalIncident: {
              path: 'new-disabilities/ptsd-assault-additional-incident',
              title: 'Additional assault PTSD event',
              depends: isAnswering781aQuestions(PTSD_INCIDENT_ITERATION),
              uiSchema: secondaryFinalIncident.uiSchema,
    Severity: Minor
    Found in src/applications/disability-benefits/all-claims/config/form.js and 1 other location - About 30 mins to fix
    src/applications/disability-benefits/all-claims/config/form.js on lines 445..451

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

    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