department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,811 of 12,811 total issues

Function pdfData has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    (rxList, allergiesList) => {
      return {
        subject: 'Full Medications List',
        headerBanner: [
          {
Severity: Major
Found in src/applications/mhv-medications/containers/Prescriptions.jsx - About 2 hrs to fix

    Function content has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const content = () => {
        return (
          <>
            {allergies?.length > 0 ? (
              <>

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

          {
            id: '3004527',
            type: 'messages',
            attributes: {
              messageId: 3004527,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444

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

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

          {
            id: '3004688',
            type: 'messages',
            attributes: {
              messageId: 3004688,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004661',
            type: 'messages',
            attributes: {
              messageId: 3004661,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004624',
            type: 'messages',
            attributes: {
              messageId: 3004624,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3258248',
            type: 'messages',
            attributes: {
              messageId: 3258248,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004593',
            type: 'messages',
            attributes: {
              messageId: 3004593,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004641',
            type: 'messages',
            attributes: {
              messageId: 3004641,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004676',
            type: 'messages',
            attributes: {
              messageId: 3004676,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004605',
            type: 'messages',
            attributes: {
              messageId: 3004605,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004551',
            type: 'messages',
            attributes: {
              messageId: 3004551,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004667',
            type: 'messages',
            attributes: {
              messageId: 3004667,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004701',
            type: 'messages',
            attributes: {
              messageId: 3004701,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004632',
            type: 'messages',
            attributes: {
              messageId: 3004632,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004536',
            type: 'messages',
            attributes: {
              messageId: 3004536,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 357..378
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

          {
            id: '3004565',
            type: 'messages',
            attributes: {
              messageId: 3004565,
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 93..114
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 115..136
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 137..158
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 159..180
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 181..202
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 203..224
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 225..246
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 247..268
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 269..290
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 291..312
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 313..334
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 379..400
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 423..444
      src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js on lines 445..466

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

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

      export const validateUtilityBillsArrayLimits = (errors, fieldData) => {
        if (fieldData) {
          fieldData.map(income => {
            if (
              income.amount > VALIDATION_LIMITS.UTILITY_BILL_MAX ||
      src/applications/financial-status-report/utils/validations.js on lines 184..197
      src/applications/financial-status-report/utils/validations.js on lines 199..212
      src/applications/financial-status-report/utils/validations.js on lines 214..230
      src/applications/financial-status-report/utils/validations.js on lines 232..245
      src/applications/financial-status-report/utils/validations.js on lines 247..260
      src/applications/financial-status-report/utils/validations.js on lines 277..290

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

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

      export const validateAdditionalIncomeArrayLimits = (errors, fieldData) => {
        if (fieldData) {
          fieldData.map(income => {
            if (
              income.amount > VALIDATION_LIMITS.ADDITIONAL_INCOME_MAX ||
      src/applications/financial-status-report/utils/validations.js on lines 184..197
      src/applications/financial-status-report/utils/validations.js on lines 214..230
      src/applications/financial-status-report/utils/validations.js on lines 232..245
      src/applications/financial-status-report/utils/validations.js on lines 247..260
      src/applications/financial-status-report/utils/validations.js on lines 262..275
      src/applications/financial-status-report/utils/validations.js on lines 277..290

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

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

      export const validateMonetaryAssetCurrencyArrayLimits = (errors, fieldData) => {
        if (fieldData) {
          fieldData.map(income => {
            if (
              income.amount > VALIDATION_LIMITS.MONETARY_ASSET_MAX ||
      src/applications/financial-status-report/utils/validations.js on lines 199..212
      src/applications/financial-status-report/utils/validations.js on lines 214..230
      src/applications/financial-status-report/utils/validations.js on lines 232..245
      src/applications/financial-status-report/utils/validations.js on lines 247..260
      src/applications/financial-status-report/utils/validations.js on lines 262..275
      src/applications/financial-status-report/utils/validations.js on lines 277..290

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

      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

      Severity
      Category
      Status
      Source
      Language