department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,177 of 14,709 total issues

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 appointments.js has 306 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        const appointments = {
          data: [
            {
              id: 'a1fab2235680b2b7432af8d6c45ffea112168c76a35668be72f595d7b89aa950',
              type: 'appointments',

          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

            File SettingsPage.jsx has 306 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React, { useEffect, useState, useRef } from 'react';
            import { useDispatch, useSelector } from 'react-redux';
            import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
            import { updatePageTitle } from '@department-of-veterans-affairs/mhv/exports';
            import { mhvUrl } from '~/platform/site-wide/mhv/utilities';
            Severity: Minor
            Found in src/applications/mhv-medical-records/containers/SettingsPage.jsx - 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

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

                const generateContentsSection = (doc, parent, data) => {
                  const infoSection = doc.struct('Sect', {
                    title: 'Information',
                  });
                  const missingRecordSets = Object.values(selfEnteredTypes).filter(
                Severity: Major
                Found in src/platform/pdf/templates/self_entered_info.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,

                    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 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 ComposeFormActionButtons has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const ComposeFormActionButtons = props => {
                            const {
                              onSend,
                              onSaveDraft,
                              formPopulated,

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

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

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

                              function hcaEnrollmentStatus(state = initialState, action) {
                                const { data = {}, response = {}, type } = action;
                                const {
                                  FETCH_ENROLLMENT_STATUS_STARTED,
                                  FETCH_ENROLLMENT_STATUS_SUCCEEDED,

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

                                const NotificationChannel = props => {
                                  const {
                                    apiStatus,
                                    channelId,
                                    channelType,

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

                                  const AllergiesPrintOnly = props => {
                                    const { allergies } = props;
                                  
                                    const content = () => {
                                      return (

                                    Function data has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      data: (state = initialState, action) => {
                                        switch (action.type) {
                                          case FETCH_POST_911_GI_BILL_ELIGIBILITY_SUCCESS:
                                            return {
                                              ...state,
                                    Severity: Major
                                    Found in src/applications/enrollment-verification/reducers/index.js - About 3 hrs to fix

                                      Function ReviewPage has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const ReviewPage = props => {
                                        const { location } = props;
                                        const [privacyCheckbox, setPrivacyCheckbox] = useState(false);
                                        const [submitted, setSubmitted] = useState(false);
                                      
                                      

                                        Function ApplicationSelector has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const ApplicationSelector = () => {
                                          const [searchTerm, setSearchTerm] = useState('');
                                        
                                          // a stand-in for the actual process config for now
                                          const processConfig = {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language