department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,177 of 14,709 total issues

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

  render() {
    const { showWizard } = this.props;

    if (showWizard === undefined) return null;

Severity: Major
Found in src/applications/edu-benefits/1995/containers/IntroductionPage.jsx - About 5 hrs to fix

    Function getSignlePreviousEnrollments has 127 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getSignlePreviousEnrollments = awards => {
      const myUUID = uuidv4();
      return (
        <div className="vye-top-border" key={myUUID}>
          {awards?.transactDate &&
    Severity: Major
    Found in src/applications/verify-your-enrollment/helpers.jsx - About 5 hrs to fix

      Function DependentInformation has 127 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const DependentInformation = props => {
        const { data, goToPath, setFormData } = props;
      
        const { dependents = [] } = data;
        const search = new URLSearchParams(window.location.search);
      Severity: Major
      Found in src/applications/hca/components/FormPages/DependentInformation.jsx - About 5 hrs to fix

        Function SearchControls has 127 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const SearchControls = props => {
          const {
            onSubmit,
            locateUser,
            geolocationInProgress,
        Severity: Major
        Found in src/applications/ask-va/components/search/SearchControls.jsx - About 5 hrs to fix

          File AddressValidationView.jsx has 378 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React from 'react';
          import PropTypes from 'prop-types';
          import { connect } from 'react-redux';
          import { VaAlert } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
          import {

            File ReviewCollapsibleChapter.jsx has 378 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import get from '@department-of-veterans-affairs/platform-forms-system/get';
            import set from '@department-of-veterans-affairs/platform-forms-system/set';
            import { getScrollOptions } from '@department-of-veterans-affairs/platform-utilities/ui';
            import classNames from 'classnames';
            import uniqueId from 'lodash/uniqueId';
            Severity: Minor
            Found in src/applications/ask-va/components/ReviewCollapsibleChapter.jsx - About 5 hrs to fix

              File utilities.js has 377 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import appendQuery from 'append-query';
              import * as Sentry from '@sentry/browser';
              import 'url-search-params-polyfill';
              import environment from 'platform/utilities/environment';
              import { createOAuthRequest } from 'platform/utilities/oauth/utilities';
              Severity: Minor
              Found in src/platform/user/authentication/utilities.js - About 5 hrs to fix

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

                import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                import footerContent from '~/platform/forms/components/FormFooter';
                import manifest from '../manifest.json';
                import transform from './submit-transformer';
                import getHelp from '../../shared/components/GetFormHelp';
                Severity: Minor
                Found in src/applications/simple-forms/21-4138/config/form.js - About 5 hrs to fix

                  Function prefillTransformerV4 has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function prefillTransformerV4(pages, formData, metadata, state) {
                    const bankInformation = state.data?.bankInformation || {};
                    const claimant = state.data?.formData?.data?.attributes?.claimant || {};
                    const serviceData = state.data?.formData?.data?.attributes?.serviceData || [];
                    const contactInfo = claimant?.contactInfo || {};
                  Severity: Major
                  Found in src/applications/my-education-benefits/helpers.js - About 5 hrs to fix

                    Function AppointmentMessage has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const AppointmentMessage = props => {
                      const { appointment, page } = props;
                      const { t } = useTranslation();
                    
                      const defaultMessage = t(

                      Function createFormConfig781a has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function createFormConfig781a(iterations) {
                        let configObj = {};
                        const formType = '781a';
                        for (let index = 0; index < iterations; index++) {
                          configObj = {
                      Severity: Major
                      Found in src/applications/disability-benefits/all-claims/config/781/index.js - About 5 hrs to fix

                        Function renderExtensionBeneficiaryZIP has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const renderExtensionBeneficiaryZIP = () => {
                            if (!displayedInputs.beneficiaryLocationQuestion) {
                              return null;
                            }
                            const extensions = getExtensions();
                        Severity: Major
                        Found in src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx - About 5 hrs to fix

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

                          import React, { useEffect } from 'react';
                          import { connect } from 'react-redux';
                          import PropTypes from 'prop-types';
                          import scrollToTop from '@department-of-veterans-affairs/platform-utilities/scrollToTop';
                          import { ConfirmationView } from 'platform/forms-system/src/js/components/ConfirmationView';
                          Severity: Minor
                          Found in src/applications/burials-ez/containers/ConfirmationPage.jsx - About 5 hrs to fix

                            Function addressUISchema has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const addressUISchema = (
                              addressPath,
                              title,
                              reviewCard,
                              fieldsAreRequired = true,
                            Severity: Major
                            Found in src/applications/disability-benefits/all-claims/utils/schemas.js - About 5 hrs to fix

                              Function VitalListItem has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const VitalListItem = props => {
                                const { record, options = {} } = props;
                                const { isAccelerating } = options;
                                const displayName = vitalTypeDisplayNames[record.type];
                              
                              

                                File MOCK_VA_APPOINTMENTS.js has 374 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                const fns = require('date-fns');
                                
                                const MOCK_VA_APPOINTMENTS = {
                                  data: [
                                    {

                                  Function uploadFile has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function uploadFile(
                                    file,
                                    uiOptions,
                                    onProgress,
                                    onChange,
                                  Severity: Major
                                  Found in src/platform/forms-system/src/js/actions.js - About 4 hrs to fix

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

                                      render() {
                                        const { item, scopes } = this.props;
                                        const { setShow } = this;
                                        const { learnIcon, show } = this.state;
                                    
                                    

                                      Function generateData has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const generateData = (type, formData) => {
                                        switch (type) {
                                          case 'claimant-information':
                                            return {
                                              'Claimant’s first name': formData?.claimantFullName?.first
                                      Severity: Major
                                      Found in src/applications/burials-ez/components/NoFormPage.jsx - About 4 hrs to fix

                                        Function Confirmation has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const Confirmation = props => {
                                          const dispatch = useDispatch();
                                          const refreshAppointments = useCallback(
                                            () => {
                                              dispatch(triggerRefresh());
                                        Severity: Major
                                        Found in src/applications/check-in/day-of/pages/Confirmation/index.jsx - About 4 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language