department-of-veterans-affairs/vets-website

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

Summary

Maintainability
F
6 days
Test Coverage

Function createFormConfig781a has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function createFormConfig781a(iterations) {
  let configObj = {};
  const formType = '781a';
  for (let index = 0; index < iterations; index++) {
    configObj = {
Severity: Major
Found in src/applications/disability-benefits/all-claims/config/781/index.js - About 5 hrs to fix

    Function createFormConfig781 has 106 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function createFormConfig781(iterations) {
      let configObj = {};
      const formType = '781';
      for (let index = 0; index < iterations; index++) {
        configObj = {
    Severity: Major
    Found in src/applications/disability-benefits/all-claims/config/781/index.js - About 4 hrs to fix

      File index.js has 290 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import {
        individualsInvolved,
        individualsInvolvedFollowUp,
        incidentSupport,
        incidentDate,
      Severity: Minor
      Found in src/applications/disability-benefits/all-claims/config/781/index.js - About 2 hrs to fix

        Function setReviewTitle has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        const setReviewTitle = (title, index, formType) => formData => {
          const additionalIncidentKeyIndex = index === 0 ? index : index - 1;
          const additionalIncidentKey = `view:enterAdditional${
            formType === '781a' ? 'Secondary' : ''
          }Events${additionalIncidentKeyIndex}`;
        Severity: Minor
        Found in src/applications/disability-benefits/all-claims/config/781/index.js - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

              [`medals${index}`]: {
                title: setReviewTitle(
                  `Medals or citations associated with${REVIEW_TITLE_TOKEN}event`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 208..218

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

        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

              [`secondaryIncidentDate${index}`]: {
                title: setReviewTitle(
                  `Date of${REVIEW_TITLE_TOKEN}event`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 86..96

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

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

              [`secondaryIncidentLocation${index}`]: {
                title: setReviewTitle(
                  `Location of${REVIEW_TITLE_TOKEN}event`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 98..104
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 106..116
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 118..128
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 130..140
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 174..184
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 220..230
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 252..262

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

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

              [`incidentDescription${index}`]: {
                title: setReviewTitle(
                  `Description of${REVIEW_TITLE_TOKEN}event`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 98..104
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 106..116
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 118..128
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 130..140
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 220..230
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 232..242
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 252..262

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

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

              [`secondaryIncidentUnitAssignment${index}`]: {
                title: setReviewTitle(
                  `Unit assignment for${REVIEW_TITLE_TOKEN}event`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 98..104
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 106..116
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 118..128
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 130..140
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 174..184
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 232..242
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 252..262

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

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

              [`individualsInvolved${index}`]: {
                title: setReviewTitle(
                  `Were other people involved in the${REVIEW_TITLE_TOKEN}event?`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 98..104
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 106..116
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 118..128
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 174..184
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 220..230
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 232..242
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 252..262

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

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

              [`secondaryIncidentDescription${index}`]: {
                title: setReviewTitle(
                  `Description of${REVIEW_TITLE_TOKEN}event`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 98..104
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 106..116
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 118..128
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 130..140
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 174..184
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 220..230
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 232..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 86.

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

              [`incidentUnitAssignment${index}`]: {
                title: setReviewTitle(
                  `Unit assignment for${REVIEW_TITLE_TOKEN}event`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 98..104
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 118..128
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 130..140
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 174..184
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 220..230
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 232..242
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 252..262

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

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

              [`incidentDate${index}`]: {
                title: setReviewTitle(`${REVIEW_TITLE_TOKEN}event`, index, formType),
                path: `disabilities/ptsd-incident-date-${index}`,
                depends: isAnswering781Questions(index),
                uiSchema: incidentDate.uiSchema(index),
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 106..116
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 118..128
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 130..140
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 174..184
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 220..230
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 232..242
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 252..262

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

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

              [`incidentLocation${index}`]: {
                title: setReviewTitle(
                  `Location of${REVIEW_TITLE_TOKEN}event`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 98..104
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 106..116
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 130..140
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 174..184
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 220..230
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 232..242
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 252..262

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

        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

              [`incidentSupport${index}`]: {
                title: setReviewTitle('PTSD incident support', index, formType),
                path: `disabilities/ptsd-incident-support-${index}`,
                depends: isAnswering781Questions(index),
                uiSchema: incidentSupport.uiSchema('781'),
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 162..172
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 244..250

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

        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

              [`secondaryIncidentSupport${index}`]: {
                title: setReviewTitle('PTSD assault incident support', index, formType),
                path: `disabilities/ptsd-secondary-incident-support-${index}`,
                depends: isAnswering781aQuestions(index),
                uiSchema: incidentSupport.uiSchema('781a'),
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 142..148
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 162..172

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

        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

              [`incidentSupportAdditional${index}`]: {
                title: setReviewTitle(
                  'PTSD incident support additional break',
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 142..148
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 244..250

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

        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

              [`ptsdSecondaryAdditionalEvents${index}`]: {
                title: 'Add another event or situation?',
                path: `disabilities/ptsd-781a-additional-events-${index}`,
                depends: isAnswering781aQuestions(index),
                uiSchema: ptsdSecondaryAdditionalEvents.uiSchema(index),
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 187..193

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 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

              [`ptsdAdditionalEvents${index}`]: {
                title: 'Add another event or situation?',
                path: `disabilities/ptsd-additional-events-${index}`,
                depends: isAnswering781Questions(index),
                uiSchema: ptsdAdditionalEvents.uiSchema(index),
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 330..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 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

              [`secondaryOtherSourcesHelp${index}`]: {
                title: setReviewTitle(
                  `781a PTSD Help with other sources of information`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 264..274

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

        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

              [`secondaryOtherSources${index}`]: {
                title: setReviewTitle(
                  `781a PTSD Other sources of information`,
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 275..285

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

        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

              [`individualsInvolvedFollowUp${index}`]: {
                title: setReviewTitle(
                  'PTSD incident individuals involved',
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 317..327

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

        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

              [`secondaryUploadSources${index}`]: {
                title: setReviewTitle(
                  '781a PTSD Upload Supporting Sources',
                  index,
                  formType,
        src/applications/disability-benefits/all-claims/config/781/index.js on lines 150..160

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

        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