department-of-veterans-affairs/vets-website

View on GitHub
src/applications/appeals/testing/nod-new/config/form.js

Summary

Maintainability
D
2 days
Test Coverage

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

import FormFooter from 'platform/forms/components/FormFooter';

// import CustomPageWrapper from '../components/CustomPageWrapper';
import IntroductionPage from '../containers/IntroductionPage';
import taskList from '../pages/taskList';
Severity: Minor
Found in src/applications/appeals/testing/nod-new/config/form.js - About 4 hrs to fix

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

            additionalInfo: {
              title: 'Add additional information',
              taskListHide: true,
              path: 'additional-info',
              depends: formData => formData['view:additionalInfo'],
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 1 other location - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 293..302

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

    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

            additionalInfoUpload: {
              title: 'Upload additional information',
              taskListHide: true,
              path: 'additional-info-upload',
              depends: formData => formData['view:additionalInfo'],
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 1 other location - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 283..292

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

    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

            extensionReason: {
              title: 'Reason for extension',
              taskListHide: true,
              path: 'extension-reason',
              depends: showExtensionReason,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 317..326
    src/applications/appeals/testing/nod-new/config/form.js on lines 327..336
    src/applications/appeals/testing/nod-new/config/form.js on lines 337..346

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

    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

            evidenceIntro: {
              title: 'Evidence submission',
              taskListHide: true,
              path: 'evidence-submission',
              depends: canUploadEvidence,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 212..221
    src/applications/appeals/testing/nod-new/config/form.js on lines 327..336
    src/applications/appeals/testing/nod-new/config/form.js on lines 337..346

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

    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

            evidenceUpload: {
              title: 'Evidence upload',
              taskListHide: true,
              path: 'evidence-submission/upload',
              depends: wantsToUploadEvidence,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 212..221
    src/applications/appeals/testing/nod-new/config/form.js on lines 317..326
    src/applications/appeals/testing/nod-new/config/form.js on lines 337..346

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

    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

            hearingType: {
              title: 'Hearing type',
              taskListHide: true,
              path: 'hearing-type',
              depends: needsHearingType,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 212..221
    src/applications/appeals/testing/nod-new/config/form.js on lines 317..326
    src/applications/appeals/testing/nod-new/config/form.js on lines 327..336

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

    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

            editMailingAddress: {
              title: 'Edit mailing address',
              taskListHide: true,
              path: 'edit-mailing-address',
              CustomPage: EditAddress,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 135..145
    src/applications/appeals/testing/nod-new/config/form.js on lines 146..156
    src/applications/appeals/testing/nod-new/config/form.js on lines 157..167

    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

            editHomePhone: {
              title: 'Edit home phone number',
              taskListHide: true,
              path: 'edit-home-phone',
              CustomPage: EditHomePhone,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 146..156
    src/applications/appeals/testing/nod-new/config/form.js on lines 157..167
    src/applications/appeals/testing/nod-new/config/form.js on lines 168..178

    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

            editEmailAddress: {
              title: 'Edit email address',
              taskListHide: true,
              path: 'edit-email-address',
              CustomPage: EditEmail,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 135..145
    src/applications/appeals/testing/nod-new/config/form.js on lines 146..156
    src/applications/appeals/testing/nod-new/config/form.js on lines 168..178

    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

            editMobilePhone: {
              title: 'Edit mobile phone number',
              taskListHide: true,
              path: 'edit-mobile-phone',
              CustomPage: EditMobilePhone,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 1 hr to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 135..145
    src/applications/appeals/testing/nod-new/config/form.js on lines 157..167
    src/applications/appeals/testing/nod-new/config/form.js on lines 168..178

    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

            additionalInfoRequest: {
              title: 'Additional information',
              taskListTitle: 'Additional information',
              path: 'additional-info-request',
              uiSchema: additionalInfoRequest.uiSchema,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 55 mins to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 116..124
    src/applications/appeals/testing/nod-new/config/form.js on lines 222..230
    src/applications/appeals/testing/nod-new/config/form.js on lines 308..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 53.

    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

            homeless: {
              title: 'Homelessness',
              taskListTitle: 'Homeless status',
              path: 'homeless',
              uiSchema: homeless.uiSchema,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 55 mins to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 222..230
    src/applications/appeals/testing/nod-new/config/form.js on lines 274..282
    src/applications/appeals/testing/nod-new/config/form.js on lines 308..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 53.

    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

            boardReviewOption: {
              title: 'Board review option',
              taskListTitle: 'Select review option',
              path: 'board-review-option',
              uiSchema: boardReview.uiSchema,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 55 mins to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 116..124
    src/applications/appeals/testing/nod-new/config/form.js on lines 222..230
    src/applications/appeals/testing/nod-new/config/form.js on lines 274..282

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

    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

            appealingVhaDenial: {
              title: 'Appealing denial of VA health care benefits',
              taskListTitle: 'Denial of VA HealthCare',
              path: 'appealing-denial',
              uiSchema: appealingVhaDenial.uiSchema,
    Severity: Major
    Found in src/applications/appeals/testing/nod-new/config/form.js and 3 other locations - About 55 mins to fix
    src/applications/appeals/testing/nod-new/config/form.js on lines 116..124
    src/applications/appeals/testing/nod-new/config/form.js on lines 274..282
    src/applications/appeals/testing/nod-new/config/form.js on lines 308..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 53.

    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