department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,177 of 14,709 total issues

Function GuardianInformation has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function GuardianInformation(schema, options) {
  // Use the defaults as necessary, but override with the options given
  const { fields, required } = {
    ...defaults(),
    ...options,
Severity: Major
Found in src/applications/edu-benefits/1990/pages/GuardianInformation.jsx - About 3 hrs to fix

    Function DependentSummary has 99 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const DependentSummary = props => {
      const {
        data,
        goBack,
        goForward,

      Function confirmationFAQ has 99 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const confirmationFAQ = () => {
        return (
          <>
            <section className="hca-confirmation-faq">
              <h2>What to do if you have questions now</h2>
      Severity: Major
      Found in src/applications/hca/components/ConfirmationPage/ConfirmationFAQ.jsx - About 3 hrs to fix

        Function MessageThreadHeader has 99 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const MessageThreadHeader = props => {
          const {
            message,
            cannotReply,
            isCreateNewModalVisible,

          Function ThreadsList has 99 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const ThreadsList = props => {
            const {
              folder,
              threadList,
              keyword,

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

            import React, { useState, useEffect, useCallback } from 'react';
            import PropTypes from 'prop-types';
            import '../sass/change-of-address-wrapper.scss';
            import { useDispatch, useSelector } from 'react-redux';
            import { useLocation } from 'react-router-dom';

              File MHVApp.jsx has 330 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import PropTypes from 'prop-types';
              import React from 'react';
              import { connect } from 'react-redux';
              import { withRouter } from 'react-router';
              import appendQuery from 'append-query';
              Severity: Minor
              Found in src/platform/user/authorization/containers/MHVApp.jsx - About 3 hrs to fix

                Function nextQuestion has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function nextQuestion(currentQuestion, answer, state) {
                  let next;
                  const noGeneralCourtMartial = ['2', '3'].includes(state['7_courtMartial']);
                  const dischargeYear = state['2_dischargeYear'];
                  const dischargeMonth = state['3_dischargeMonth'] || 1;
                Severity: Major
                Found in src/applications/discharge-wizard/reducers/discharge-wizard.js - About 3 hrs to fix

                  Function renderMedicalRecordInfo has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const renderMedicalRecordInfo = formResponses => {
                    const reason = formResponses[SHORT_NAME_MAP.REASON];
                    if (
                      [
                        RESPONSES.REASON_PTSD,
                  Severity: Major
                  Found in src/applications/discharge-wizard/helpers/index.jsx - About 3 hrs to fix

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

                      render() {
                        const { form } = this.props;
                        const { submission, data } = form;
                    
                        const submitDate = new Date(submission?.timestamp);

                      Function handleSearchOnQueryChange has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const handleSearchOnQueryChange = () => {
                          const { currentQuery, searchResults } = props;
                          const {
                            context,
                            representativeInputString,
                      Severity: Major
                      Found in src/applications/representative-search/containers/SearchPage.jsx - About 3 hrs to fix

                        Function makeSchemas has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function makeSchemas(prefix) {
                          const properties = makeFormProperties(prefix);
                          const schema = {
                            type: 'object',
                            properties: {

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

                          // Node modules.
                          import React, { Component } from 'react';
                          import PropTypes from 'prop-types';
                          import { isEmpty, map, replace } from 'lodash';
                          import * as Sentry from '@sentry/browser';

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

                              render() {
                                const { searchTerm, ariaLive1, ariaLive2, filteredOptions } = this.state;
                                const autocompleteHelperText =
                                  searchTerm?.length > 0
                                    ? null

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

                                render() {
                                  let paymentsReceivedTable = '';
                                  let paymentsReturnedTable = '';
                                  let content;
                                  // If the app is loading, show a loading LoadingIndicator

                                Function CustomReviewTopContent has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const CustomReviewTopContent = () => {
                                  const { form } = useSelector(state => state || {});
                                  const {
                                    uploadedFile,
                                    idNumber,

                                  File InstallmentContract.jsx has 330 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React, { useState } from 'react';
                                  import PropTypes from 'prop-types';
                                  import { connect } from 'react-redux';
                                  import { setData } from 'platform/forms-system/src/js/actions';
                                  import {

                                    Function MessageReply has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const MessageReply = () => {
                                      const dispatch = useDispatch();
                                      const { replyId } = useParams();
                                      const { drafts, error, messages } = useSelector(
                                        state => state.sm.threadDetails,
                                    Severity: Major
                                    Found in src/applications/mhv-secure-messaging/containers/MessageReply.jsx - About 3 hrs to fix

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

                                        render() {
                                          const {
                                            appealsLoading,
                                            claimsLoading,
                                            list,
                                      Severity: Major
                                      Found in src/applications/claims-status/containers/YourClaimsPageV2.jsx - About 3 hrs to fix

                                        Function ClaimDetailLayout has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function ClaimDetailLayout(props) {
                                          const { claim, clearNotification, currentTab, loading, message } = props;
                                        
                                          const tabs = ['Status', 'Files', 'Details', 'Overview'];
                                        
                                        
                                        Severity: Major
                                        Found in src/applications/claims-status/components/ClaimDetailLayout.jsx - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language