department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function handleChange has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleChange = e => {
    const multiples =
      multipleOptions ?? showMultipleNames(filteredSuggestions, name);

    let allowContinue = false;
Severity: Major
Found in src/applications/gi/components/LicenseCertificationSearchForm.jsx - About 2 hrs to fix

    Function fetchMilitaryInformation has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function fetchMilitaryInformation(recordAnalyticsEvent = recordEvent) {
      return async dispatch => {
        dispatch({ type: FETCH_MILITARY_INFORMATION });
    
        const baseUrl = '/profile/service_history';
    Severity: Major
    Found in src/applications/personalization/profile/actions/index.js - About 2 hrs to fix

      Function careSummariesAndNotesReducer has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const careSummariesAndNotesReducer = (state = initialState, action) => {
        switch (action.type) {
          case Actions.CareSummariesAndNotes.GET: {
            return {
              ...state,

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

            allergiesPdfList => {
              return {
                subject: `Single Medication Record - ${prescription?.prescriptionName}`,
                headerBanner: [
                  {
        Severity: Major
        Found in src/applications/mhv-medications/containers/PrescriptionDetails.jsx - About 2 hrs to fix

          File veteranMarriageHistoryArrayPages.js has 283 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import { format, parseISO } from 'date-fns';
          import { capitalize } from 'lodash';
          import {
            textUI,
            textSchema,

            File IntroductionPage.jsx has 283 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React, { useEffect } from 'react';
            
            import PropTypes from 'prop-types';
            import { useDispatch, useSelector } from 'react-redux';
            import { setData } from '~/platform/forms-system/src/js/actions';

              File spouseMarriageHistoryArrayPages.js has 282 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import { format, parseISO } from 'date-fns';
              import { capitalize } from 'lodash';
              import {
                textUI,
                textSchema,

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

                const { cloneDeep, set } = require('lodash');
                const { USER } = require('../../constants/user');
                
                const loa3User = {
                  data: {

                  Function setupJSDom has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function setupJSDom() {
                    // Prevent warnings from displaying
                    /* eslint-disable no-console */
                    if (process.env.LOG_LEVEL === 'debug') {
                      console.error = (error, reactError) => {
                  Severity: Major
                  Found in src/platform/testing/unit/mocha-setup.js - About 2 hrs to fix

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

                      render() {
                        const {
                          uiSchema,
                          errorSchema,
                          idSchema,
                    Severity: Major
                    Found in src/platform/forms-system/src/js/review/ReadOnlyArrayField.jsx - About 2 hrs to fix

                      Function setHiddenFields has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function setHiddenFields(schema, uiSchema, formData, path = []) {
                        if (!uiSchema) {
                          return schema;
                        }
                      
                      
                      Severity: Major
                      Found in src/platform/forms-system/src/js/state/helpers.js - About 2 hrs to fix

                        Function formatOperatingHours has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const formatOperatingHours = operatingHours => {
                          if (!operatingHours) return operatingHours;
                          // Remove all whitespace and sanitize dashes.
                          const sanitizedOperatingHours = operatingHours
                            .replace(/ /g, '')
                        Severity: Major
                        Found in src/applications/facility-locator/utils/helpers.jsx - About 2 hrs to fix

                          Function BuildPage has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const BuildPage = props => {
                            const { title, field, id, goToPath, subTitle } = props;
                          
                            const headerRef = useRef(null);
                          
                          

                            Function RegisterFailed has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const RegisterFailed = () => {
                              const content = {
                                heading: 'We couldn’t create a MyHealtheVet account for you',
                                alertText: (
                                  <>

                              Function getTravelMessage has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const getTravelMessage = () => {
                                  if (
                                    form.data['travel-question'] === 'no' ||
                                    !isTravelReimbursementEnabled
                                  ) {
                              Severity: Major
                              Found in src/applications/check-in/day-of/pages/Error.jsx - About 2 hrs to fix

                                Function DraftSavedInfo has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const DraftSavedInfo = props => {
                                  const { messageId, drafts } = props;
                                
                                  const threadDetails = useSelector(state => state.sm.threadDetails);
                                
                                

                                  Function openFacilityPageV2 has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function openFacilityPageV2(page, uiSchema, schema) {
                                    return async (dispatch, getState) => {
                                      try {
                                        const initialState = getState();
                                        const { newAppointment } = initialState;
                                  Severity: Major
                                  Found in src/applications/vaos/new-appointment/redux/actions.js - About 2 hrs to fix

                                    Function BuildRoutes has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const BuildRoutes = () => {
                                      const { useToggleValue, TOGGLE_NAMES } = useFeatureToggle();
                                      const toggleValue = useToggleValue(TOGGLE_NAMES.isUpdatedGi);
                                      const lcToggleValue = useToggleValue(
                                        TOGGLE_NAMES.giComparisonToolLceToggleFlag,
                                    Severity: Major
                                    Found in src/applications/gi/routes.jsx - About 2 hrs to fix

                                      Function fetchResultsThunk has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const fetchResultsThunk = (options = {}) => async dispatch => {
                                        // Derive options properties.
                                        const city = options?.city || null;
                                        const contributionAmount = options?.contributionAmount || null;
                                        const hideFetchingState = options?.hideFetchingState;
                                      Severity: Major
                                      Found in src/applications/yellow-ribbon/actions/index.js - About 2 hrs to fix

                                        Function claimsReducer has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function claimsReducer(state = initialState, action) {
                                          switch (action.type) {
                                            case FETCH_CLAIMS_PENDING:
                                              return set(state, true, 'claimsLoading');
                                            case FETCH_CLAIMS_SUCCESS:
                                        Severity: Major
                                        Found in src/applications/personalization/dashboard/reducers/claims.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language