department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Consider simplifying this complex logical expression.
Open

                if (
                  (route.requiresLOA3 && !this.props.isLOA3) ||
                  (route.requiresMVI && !this.props.isInMVI) ||
                  (route.requiresLOA3 && this.props.isBlocked)
                ) {
Severity: Major
Found in src/applications/personalization/profile/components/Profile.jsx - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

      if (records?.length) {
        const vitalDisplayName = vitalTypeDisplayNames[records[0].type];
        return (
          <>
            <PrintHeader />
    Severity: Major
    Found in src/applications/mhv-medical-records/containers/VitalDetails.jsx - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

        if (isRefillable) {
          return (
            <div className="rx-fill-refill-button" data-testid="fill-refill">
              {success && (
                <va-alert status="success" setFocus aria-live="polite" uswds>
      Severity: Major
      Found in src/applications/mhv-medications/components/shared/FillRefillButton.jsx - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

              } else if (
                ((prescriptionsFullList?.length &&
                  pdfTxtGenerateStatus.format !== PRINT_FORMAT.PRINT) ||
                  (paginatedPrescriptionsList?.length &&
                    pdfTxtGenerateStatus.format === PRINT_FORMAT.PRINT)) &&
        Severity: Major
        Found in src/applications/mhv-medications/containers/Prescriptions.jsx - About 40 mins to fix

          Function setSaveFormStatus has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            saveType,
            status,
            lastSavedDate = null,
            expirationDate = null,
            inProgressFormId = null,
          Severity: Minor
          Found in src/platform/forms/save-in-progress/actions.js - About 35 mins to fix

            Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              errors,
              routingNumber,
              formData,
              schema,
              errorMessages,
            Severity: Minor
            Found in src/platform/forms/definitions/bankAccount.js - About 35 mins to fix

              Function validateNameSymbols has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              export function validateNameSymbols(errors, value, uiSchema, schema, messages) {

                Function validateCurrentOrFutureDate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  errors,
                  dateString,
                  formData,
                  schema,
                  errorMessages = {},
                Severity: Minor
                Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                  Function validateDateRangeAllowSameMonth has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    errors,
                    dateRange,
                    formData,
                    schema,
                    errorMessages,
                  Severity: Minor
                  Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                    Function validateCurrentOrPastMonthYear has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      errors,
                      dateString,
                      formData,
                      schema,
                      errorMessages = {},
                    Severity: Minor
                    Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                      Function validateCurrentOrPastDate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        errors,
                        dateString,
                        formData,
                        schema,
                        errorMessages = {},
                      Severity: Minor
                      Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                        Function validateCurrentOrPastMemorableDate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          errors,
                          dateString,
                          formData,
                          schema,
                          errorMessages = {},
                        Severity: Minor
                        Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                          Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            errors,
                            routingNumber,
                            formData,
                            schema,
                            errorMessages,
                          Severity: Minor
                          Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                            Function validateBooleanGroup has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              errors,
                              userGroup,
                              form,
                              schema,
                              errorMessages = {},
                            Severity: Minor
                            Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                              Function addressUiSchema has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                path = 'address',
                                checkBoxTitle = 'I live on a United States military base outside of the U.S.',
                                uiRequiredCallback = () => false,
                                newSchemaKeys = {},
                                onlyAllowUSAddresses = false,
                              Severity: Minor
                              Found in src/platform/forms-system/src/js/definitions/profileAddress.js - About 35 mins to fix

                                Function updateSchemaFromUiSchema has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  schema,
                                  uiSchema,
                                  formData,
                                  index = null,
                                  path = [],
                                Severity: Minor
                                Found in src/platform/forms-system/src/js/state/helpers.js - About 35 mins to fix

                                  Function showReviewField has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                    propName,
                                    schema,
                                    uiSchema,
                                    formData,
                                    formContext,
                                  Severity: Minor
                                  Found in src/platform/forms-system/src/js/helpers.js - About 35 mins to fix

                                    Function createTransaction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                      route,
                                      method,
                                      fieldName,
                                      payload,
                                      analyticsSectionName,
                                    Severity: Minor
                                    Found in src/platform/user/profile/vap-svc/actions/transactions.js - About 35 mins to fix

                                      Function uiSchema has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                        label = 'Address',
                                        useStreet2 = true,
                                        useStreet3 = false,
                                        isRequired = null,
                                        ignoreRequired = false,

                                        Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                          errors,
                                          routingNumber,
                                          formData,
                                          schema,
                                          errorMessages,
                                        Severity: Minor
                                        Found in src/applications/edu-benefits/5490/content/directDeposit.jsx - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language