department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,675 of 12,675 total issues

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

        {!haveBatteriesBeenOrderedInLastTwoYears &&
          !areBatterySuppliesEligible && (
            <va-alert status="info" visible>
              <h3 slot="headline">
                Your batteries aren’t available for online ordering
src/applications/disability-benefits/2346/components/Batteries.jsx on lines 79..105

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

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

Function renderResults has 203 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderResults() {
    const { searchGovMaintenance } = this.props;
    const {
      loading,
      errors,
Severity: Major
Found in src/applications/search/containers/SearchApp.jsx - About 1 day to fix

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 71..135
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 201..265
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 266..330
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 331..395
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 396..460
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 461..525
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 526..590
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 591..655

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 71..135
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 136..200
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 201..265
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 331..395
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 396..460
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 461..525
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 526..590
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 591..655

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 136..200
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 201..265
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 266..330
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 331..395
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 396..460
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 461..525
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 526..590
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 591..655

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 71..135
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 136..200
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 266..330
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 331..395
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 396..460
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 461..525
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 526..590
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 591..655

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 71..135
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 136..200
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 201..265
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 266..330
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 331..395
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 396..460
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 461..525
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 591..655

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 71..135
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 136..200
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 201..265
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 266..330
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 331..395
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 396..460
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 526..590
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 591..655

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 71..135
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 136..200
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 201..265
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 266..330
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 331..395
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 461..525
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 526..590
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 591..655

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 71..135
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 136..200
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 201..265
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 266..330
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 396..460
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 461..525
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 526..590
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 591..655

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        {
          resource: {
            code: {
              coding: [
                {
    Severity: Major
    Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 8 other locations - About 1 day to fix
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 71..135
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 136..200
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 201..265
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 266..330
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 331..395
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 396..460
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 461..525
    src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 526..590

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

    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

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

      handleChecked = (checked, batterySupply) => {
        const { order, formData } = this.props;
        let updatedOrder;
        const isSupplyChecked = checked ? 'yes' : 'no';
        recordEvent({
    src/applications/health-care-supply-reordering/components/Batteries.jsx on lines 28..53

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

    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

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

      handleChecked = (checked, batterySupply) => {
        const { order, formData } = this.props;
        let updatedOrder;
        const isSupplyChecked = checked ? 'yes' : 'no';
        recordEvent({
    src/applications/disability-benefits/2346/components/Batteries.jsx on lines 26..51

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

    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

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

      function OffsetAt(at) {
        var timeString = at.toTimeString();
        var abbr = timeString.match(/\([a-z ]+\)/i);
        if (abbr && abbr[0]) {
          // 17:56:31 GMT-0600 (CST)
    Severity: Major
    Found in src/applications/personalization/dashboard/lib/moment-tz.js and 1 other location - About 1 day to fix
    src/applications/vaos/lib/moment-tz.js on lines 214..236

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

    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

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

        function OffsetAt(at) {
            var timeString = at.toTimeString();
            var abbr = timeString.match(/\([a-z ]+\)/i);
            if (abbr && abbr[0]) {
                // 17:56:31 GMT-0600 (CST)
    Severity: Major
    Found in src/applications/vaos/lib/moment-tz.js and 1 other location - About 1 day to fix
    src/applications/personalization/dashboard/lib/moment-tz.js on lines 224..246

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

    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

    Function uiSchema has 202 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function uiSchema(
      label = 'Address',
      useStreet2 = true,
      useStreet3 = false,
      isRequired = null,

      Function transform has 202 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function transform(formConfig, form) {
        // Grab isBDD before things are changed/deleted
        const isBDDForm = isBDD(form.data);
        // Grab ratedDisabilities before they're deleted in case the page is inactive
        // We need to send all of these to vets-api even if the veteran doesn't apply
      Severity: Major
      Found in src/applications/disability-benefits/all-claims/submit-transformer.js - About 1 day to fix

        File ArrayField.jsx has 500 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import PropTypes from 'prop-types';
        import React from 'react';
        import classNames from 'classnames';
        import Scroll from 'react-scroll';
        
        
        Severity: Minor
        Found in src/platform/forms-system/src/js/fields/ArrayField.jsx - About 1 day to fix

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

                      if (hasVisibleError) {
                        setTimeout(() => {
                          scrollToFirstError();
                          if (enableShortWorkflow) {
                            const retryButton = $(`[name="retry_upload_${index}"]`);
          Severity: Major
          Found in src/applications/pre-need/components/FileField.jsx and 1 other location - About 1 day to fix
          src/platform/forms-system/src/js/fields/FileField.jsx on lines 485..507

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

          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

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

                      if (hasVisibleError) {
                        setTimeout(() => {
                          scrollToFirstError();
                          if (enableShortWorkflow) {
                            const retryButton = $(`[name="retry_upload_${index}"]`);
          Severity: Major
          Found in src/platform/forms-system/src/js/fields/FileField.jsx and 1 other location - About 1 day to fix
          src/applications/pre-need/components/FileField.jsx on lines 474..496

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

          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