department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function FindVaForms has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const FindVaForms = () => {
  return (
    <>
      <SearchForm />
      <SearchResults />
Severity: Major
Found in src/applications/find-forms/components/FindVaForms.jsx - About 3 hrs to fix

    Function submitTransformer has 77 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const submitTransformer = (formConfig, form) => {
      const { data: formData } = form;
      const primaryKey = hasPrimaryCaregiver(formData) ? 'primary' : null;
      const SecondaryOneKey = hasSecondaryCaregiverOne(formData)
        ? 'secondaryOne'
    Severity: Major
    Found in src/applications/caregivers/config/submit-transformer.js - About 3 hrs to fix

      Function SignatureInput has 77 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const SignatureInput = props => {
        const {
          fullName,
          required,
          label,

        File AddFilesForm.jsx has 295 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import PropTypes from 'prop-types';
        import React from 'react';
        
        import {
          VaFileInput,

          Function FillRefillButton has 77 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const FillRefillButton = rx => {
            const dispatch = useDispatch();
          
            const { dispensedDate, error, prescriptionId, success, isRefillable } = rx;
          
          

            File AutosuggestField.jsx has 294 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React from 'react';
            import PropTypes from 'prop-types';
            import Downshift from 'downshift';
            import classNames from 'classnames';
            import set from '../../../../utilities/data/set';
            Severity: Minor
            Found in src/platform/forms-system/src/js/fields/AutosuggestField.jsx - About 3 hrs to fix

              Function updateSchemaFromUiSchema has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function updateSchemaFromUiSchema(
                schema,
                uiSchema,
                formData,
                index = null,
              Severity: Major
              Found in src/platform/forms-system/src/js/state/helpers.js - About 3 hrs to fix

                Function render has 76 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/edu-benefits/1919/containers/IntroductionPage.jsx - About 3 hrs to fix

                  Function reasonStatement has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const reasonStatement = () => {
                      const reason = formResponses[SHORT_NAME_MAP.REASON];
                      const dischargeType = formResponses[SHORT_NAME_MAP.DISCHARGE_TYPE];
                  
                      switch (reason) {

                    Function reasonStatement has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const reasonStatement = formValues => {
                      const reason = formValues['4_reason'];
                      const dischargeType = formValues['5_dischargeType'];
                    
                      switch (reason) {

                      Function render has 76 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/edu-benefits/8794/containers/IntroductionPage.jsx - About 3 hrs to fix

                        Function buildLevelOneLinks has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const buildLevelOneLinks = (sectionData, index) => {
                            if (sectionData.menuSections) {
                              return (
                                <Fragment key={index}>
                                  <li className="vads-u-background-color--primary-dark vads-u-margin--0 vads-u-margin-bottom--1 vads-u-width--full vads-u-font-weight--bold">

                          Function BreadCrumbs has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function BreadCrumbs() {
                            const { pathname } = useLocation();
                            const history = useHistory();
                            const uuidPathRegex = /^\/claims\/[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[89ABCD][0-9A-F]{3}-[0-9A-F]{12}$/i;
                            const isDetailsPage = pathname.match(uuidPathRegex);
                          Severity: Major
                          Found in src/applications/travel-pay/components/Breadcrumbs.jsx - About 3 hrs to fix

                            Function ValidateVeteran has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const ValidateVeteran = props => {
                              const { router } = props;
                              const { t } = useTranslation();
                              const dispatch = useDispatch();
                              const { setPermissions } = useStorage(APP_NAMES.CHECK_IN);
                            Severity: Major
                            Found in src/applications/check-in/day-of/pages/ValidateVeteran.jsx - About 3 hrs to fix

                              Function ConfirmationPage has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const ConfirmationPage = props => {
                                const form = useSelector(state => state.form || {});
                                const { submission } = form;
                                const submitDate = submission.timestamp;
                                const { confirmationNumber, referenceNumber, status } =
                              Severity: Major
                              Found in src/applications/simple-forms/26-4555/containers/ConfirmationPage.jsx - About 3 hrs to fix

                                Function SignatureCheckbox has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const SignatureCheckbox = props => {
                                  const {
                                    children,
                                    fullName,
                                    isRequired,

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

                                    const content = () => {
                                      if (!isLoaded) {
                                        return (
                                          <va-loading-indicator
                                            message="Loading your secure message..."
                                  Severity: Major
                                  Found in src/applications/mhv-secure-messaging/containers/ThreadDetails.jsx - About 3 hrs to fix

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

                                      render() {
                                        let content;
                                    
                                        if (this.props.loading) {
                                          content = (
                                    Severity: Major
                                    Found in src/applications/claims-status/containers/DocumentRequestPage.jsx - About 3 hrs to fix

                                      Function ViewDependentsHeader has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function ViewDependentsHeader(props) {
                                        const { updateDiariesStatus } = props;
                                        let alertProps;
                                        // handle status from api
                                        switch (updateDiariesStatus) {

                                        Function PersonalInformation has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const PersonalInformation = () => {
                                          const location = useLocation();
                                        
                                          const hasUnsavedEdits = useSelector(
                                            state => state.vapService.hasUnsavedEdits,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language