department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function addAccordionClickHandler has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const addAccordionClickHandler = () => {
  Array.from(
    document.querySelectorAll('.usa-accordion, .usa-accordion-bordered'),
  ).forEach(element => {
    const parents = getAccordionParents(element);
Severity: Major
Found in src/platform/site-wide/legacy-component-js/accordion.js - About 2 hrs to fix

    Function addressValidationSuccess has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      addressValidationSuccess() {
        return asyncReturn(
          {
            addresses: [
              {
    Severity: Major
    Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 2 hrs to fix

      Function render has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        render() {
          const dataType = this.props.schema.type;
          if (dataType !== 'array') {
            throw new Error(`Data Type ${dataType} not supported.`);
          }
      Severity: Major
      Found in src/applications/my-education-benefits/components/AccordionField.jsx - About 2 hrs to fix

        File PreviousEnrollmentVerifications.jsx has 280 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React, { useState, useCallback, useEffect } from 'react';
        import PropTypes from 'prop-types';
        import { VaPagination } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
        import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
        import { useSelector } from 'react-redux';

          Function renderProcessColumn has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const renderProcessColumn = (
              processName,
              displayName,
              startConfig,
              stopPort,

            Function MultipleIds has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const MultipleIds = () => {
              const content = {
                heading: 'It looks like you have more than one My HealtheVet account',
                alertText: (
                  <div>

              Function useSendPreCheckInData has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const useSendPreCheckInData = () => {
                const selectForm = useMemo(makeSelectForm, []);
                const { data } = useSelector(selectForm);
                const [isLoading, setIsLoading] = useState(true);
                const {
              Severity: Major
              Found in src/applications/check-in/hooks/useSendPreCheckInData.jsx - About 2 hrs to fix

                Function render has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  render() {
                    const { route } = this.props;
                    const { formConfig, pageList } = route;
                
                    return (
                Severity: Major
                Found in src/applications/travel-pay/containers/IntroductionPage.jsx - About 2 hrs to fix

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

                    const content = () => {
                      const folderCount = folders?.length;
                      if (folders === undefined) {
                        return (
                          <va-loading-indicator
                  Severity: Major
                  Found in src/applications/mhv-secure-messaging/containers/Folders.jsx - About 2 hrs to fix

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

                    import React from 'react';
                    import { expect } from 'chai';
                    import { waitFor } from '@testing-library/dom';
                    import { cleanup } from '@testing-library/react';
                    import userEvent from '@testing-library/user-event';

                      Function ChooseDateAndTime has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const ChooseDateAndTime = props => {
                        const { currentReferral } = props;
                        const dispatch = useDispatch();
                        const location = useLocation();
                      
                      
                      Severity: Major
                      Found in src/applications/vaos/referral-appointments/ChooseDateAndTime.jsx - About 2 hrs to fix

                        Function aboutTheSchoolOptions has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function aboutTheSchoolOptions(
                          excludeCautionFlags,
                          accredited,
                          studentVeteran,
                          yellowRibbonScholarship,
                        Severity: Major
                        Found in src/applications/gi/containers/search/FilterBeforeResults.jsx - About 2 hrs to fix

                          File labsAndTests.js has 280 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          export const generateLabsIntro = record => {
                            return {
                              title: `Lab and test results: ${record.name}`,
                              subject: 'VA Medical Record',
                              preface:
                          Severity: Minor
                          Found in src/applications/mhv-medical-records/util/pdfHelpers/labsAndTests.js - About 2 hrs to fix

                            Function RxBreadcrumbs has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const RxBreadcrumbs = () => {
                              const location = useLocation();
                              const prescription = useSelector(
                                state => state.rx.prescriptions?.prescriptionDetails,
                              );
                            Severity: Major
                            Found in src/applications/mhv-medications/containers/RxBreadcrumbs.jsx - About 2 hrs to fix

                              Function buildVAPrescriptionTXT has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const buildVAPrescriptionTXT = prescription => {
                                const refillHistory = [...(prescription?.rxRfRecords || [])];
                                const originalFill = createOriginalFillRecord(prescription);
                                refillHistory.push(originalFill);
                              
                              
                              Severity: Major
                              Found in src/applications/mhv-medications/util/txtConfigs.js - About 2 hrs to fix

                                Function render has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render() {
                                    const {
                                      analyticsSectionName,
                                      fieldName,
                                      isEditing,

                                  Function Balances has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const Balances = () => {
                                    // get balances from redux
                                    const { debtLetters, mcp } = useSelector(
                                      ({ combinedPortal }) => combinedPortal,
                                    );

                                    Function createAdditionalConsiderations has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function createAdditionalConsiderations(submissionForm) {
                                      if (submissionForm?.mebExclusionPeriodEnabled) {
                                        const exclusionPeriods = submissionForm.exclusionPeriods || [];
                                        const mapping = {
                                          academyRotcScholarship: {
                                    Severity: Major
                                    Found in src/applications/my-education-benefits/utils/form-submit-transform.js - About 2 hrs to fix

                                      Function navigateForward has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const navigateForward = (
                                        SHORT_NAME,
                                        formResponses,
                                        router,
                                        editMode,
                                      Severity: Major
                                      Found in src/applications/discharge-wizard/utilities/page-navigation.js - About 2 hrs to fix

                                        Function IntroductionPage has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const IntroductionPage = props => {
                                          const { route } = props;
                                          const { formConfig, pageList } = route;
                                        
                                          useEffect(
                                        Severity: Major
                                        Found in src/applications/ivc-champva/10-7959C/containers/IntroductionPage.jsx - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language