department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function transformFormToVAOSCCRequest has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function transformFormToVAOSCCRequest(state) {
  const data = getFormData(state);
  const provider = data.communityCareProvider;
  const residentialAddress = selectVAPResidentialAddress(state);
  const parentFacility = getChosenCCSystemById(state);

    Function PreferredProviderSection has 85 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function PreferredProviderSection(props) {
      const history = useHistory();
      const pageFlow = useSelector(getNewAppointmentFlow);
    
      return (

      Function ReviewApproved has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function ReviewApproved() {
        const history = useHistory();
        const dispatch = useDispatch();
        const storedFilterProvider = useSelector(selectProvider);
        const storedSortProviderBy = useSelector(selectProviderSortBy);
      Severity: Major
      Found in src/applications/vaos/referral-appointments/FilterPage.jsx - About 3 hrs to fix

        Function parseLabsAndTests has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const parseLabsAndTests = records => {
          return `
        ${txtLine}
        1) Lab and test results
        
        
        Severity: Major
        Found in src/applications/mhv-medical-records/util/txtHelpers/labsAndTests.js - About 3 hrs to fix

          File address.js has 308 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import get from 'platform/utilities/data/get';
          import set from 'platform/utilities/data/set';
          import unset from 'platform/utilities/data/unset';
          import { createSelector } from 'reselect';
          
          
          Severity: Minor
          Found in src/applications/pre-need/definitions/address.js - About 3 hrs to fix

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

            import { VA_FORM_IDS } from 'platform/forms/constants';
            import environment from 'platform/utilities/environment';
            import FormFooter from 'platform/forms/components/FormFooter';
            import { externalServices } from 'platform/monitoring/DowntimeNotification';
            import {
            Severity: Minor
            Found in src/applications/caregivers/config/form.js - About 3 hrs to fix

              File ChangeOfAddressWrapper.jsx has 308 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import React, { useState, useEffect, useCallback } from 'react';
              import PropTypes from 'prop-types';
              import { useDispatch, useSelector } from 'react-redux';
              import { useLocation } from 'react-router-dom';
              import LoadingButton from '~/platform/site-wide/loading-button/LoadingButton';

                File AutosugggestField.jsx has 308 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React from 'react';
                import PropTypes from 'prop-types';
                import Downshift from 'downshift';
                import classNames from 'classnames';
                
                

                  Function createSchoolSelectionPage has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function createSchoolSelectionPage(schema, options) {
                    const { fields, required, title } = options;
                  
                    const possibleUISchemaFields = {
                      educationProgram: educationProgram.uiSchema,
                  Severity: Major
                  Found in src/applications/edu-benefits/pages/schoolSelection.js - About 3 hrs to fix

                    Function filterEvents has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const filterEvents = (
                      events,
                      filterBy,
                      options = {},
                      now = moment(),
                    Severity: Major
                    Found in src/applications/static-pages/events/helpers/index.js - About 3 hrs to fix

                      Function GettingStartedWithVetTec has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const GettingStartedWithVetTec = () => {
                        return (
                          <div className="vads-u-padding-top--1 vads-u-padding-bottom--3 small-screen-font">
                            <div className="vads-u-padding-bottom--1px">
                              <h3 className="small-screen-font">
                      Severity: Major
                      Found in src/applications/gi/components/vet-tec/GettingStartedWithVetTec.jsx - About 3 hrs to fix

                        File address.js has 306 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import get from 'platform/utilities/data/get';
                        import set from 'platform/utilities/data/set';
                        import unset from 'platform/utilities/data/unset';
                        import { createSelector } from 'reselect';
                        
                        
                        Severity: Minor
                        Found in src/applications/pre-need-integration/definitions/address.js - About 3 hrs to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      if (isReviewMode ? isEditing : isLast || isEditing) {
                                        return (
                                          <CardOrDiv
                                            key={index}
                                            id={`${this.props.idSchema.$id}_${index}`}
                          Severity: Critical
                          Found in src/platform/forms-system/src/js/fields/ArrayField.jsx - About 3 hrs to fix

                            File SearchMenu.jsx has 305 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import PropTypes from 'prop-types';
                            import React from 'react';
                            import { connect } from 'react-redux';
                            import { toggleValues } from 'platform/site-wide/feature-toggles/selectors';
                            import FEATURE_FLAG_NAMES from 'platform/utilities/feature-toggles/featureFlagNames';
                            Severity: Minor
                            Found in src/platform/site-wide/user-nav/components/SearchMenu.jsx - About 3 hrs to fix

                              Function uiSchemaValidate has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function uiSchemaValidate(
                                errors,
                                uiSchema,
                                schema,
                                formData,
                              Severity: Major
                              Found in src/platform/forms-system/src/js/validation.js - About 3 hrs to fix

                                File ApplicantRelationshipPage.jsx has 305 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import React, { useState, useEffect } from 'react';
                                import {
                                  VaButton,
                                  VaRadio,
                                  VaTextInput,

                                  File ConfirmationPage.jsx has 305 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React, { useEffect } from 'react';
                                  import { connect } from 'react-redux';
                                  import scrollToTop from '@department-of-veterans-affairs/platform-utilities/scrollToTop';
                                  import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
                                  import { benefitsLabels } from '../utils/labels';
                                  Severity: Minor
                                  Found in src/applications/burials-ez/containers/ConfirmationPage.jsx - About 3 hrs to fix

                                    Function MobileOfficialGovtWebsite has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const MobileOfficialGovtWebsite = () => {
                                      const [expanded, setExpanded] = useState(false);
                                    
                                      const onToggle = () => {
                                        if (expanded) {

                                      Function SpouseEmploymentQuestion has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const SpouseEmploymentQuestion = props => {
                                        const {
                                          data,
                                          goBack,
                                          goToPath,

                                        Function ThreadListSort has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const ThreadListSort = props => {
                                          const { sortOrder, sortCallback } = props;
                                          const location = useLocation();
                                          const [sortOrderValue, setSortOrderValue] = useState(sortOrder);
                                        
                                        
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language