department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function mapStateToProps has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const mapStateToProps = state => {
  const mailingFieldName = VAP_SERVICE.FIELD_NAMES.MAILING_ADDRESS;

  const {
    apiRoute,

    Function sharingReducer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const sharingReducer = (state = initialState, action) => {
      switch (action.type) {
        case Actions.Sharing.STATUS: {
          const { consentStatus } = action.response;
          return {
    Severity: Minor
    Found in src/applications/mhv-medical-records/reducers/sharing.js - About 1 hr to fix

      Function idcard has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function idcard(state = initialState, action) {
        switch (action.type) {
          case ATTRS_FETCHING:
            return {
              ...state,
      Severity: Minor
      Found in src/applications/veteran-id-card/reducers/idcard.js - About 1 hr to fix

        Function failedMsg has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const failedMsg = () => {
            return (
              <va-alert
                status="warning"
                visible

          Function imageStatusContent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const imageStatusContent = () => {
              if (radiologyDetails.studyId) {
                if (processingRequest) {
                  return (
                    <va-loading-indicator

            Function convertMedication has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const convertMedication = med => {
              if (!med) return null;
              if (med.dispStatus?.toLowerCase()?.includes('non-va'))
                return convertNonVaMedication(med);
            
            
            Severity: Minor
            Found in src/applications/mhv-medical-records/reducers/blueButton.js - About 1 hr to fix

              Function generateMedicalEventsContent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const generateMedicalEventsContent = record => {
                return {
                  title: record.medicalEvent,
                  details: [
                    {

                Function HealthcareError has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const HealthcareError = () => {
                    // status will be 'warning' if toggle is on
                    const status = useToggleValue(TOGGLE_NAMES.myVaUpdateErrorsWarnings)
                      ? 'warning'
                      : 'error';

                  Function buildNonVAPrescriptionTXT has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const buildNonVAPrescriptionTXT = prescription => {
                    return `
                  ---------------------------------------------------------------------------------
                  
                  
                  
                  Severity: Minor
                  Found in src/applications/mhv-medications/util/txtConfigs.js - About 1 hr to fix

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

                      const content = () => {
                        return (
                          <>
                            {page ? (
                              <PrintOnlyPage

                      Function benefitEndDateExplanation has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function benefitEndDateExplanation(condition, delimitingDate) {
                        switch (condition) {
                          case 'activeDuty':
                            return (
                              <div className="section benefit-end-date">
                      Severity: Minor
                      Found in src/applications/post-911-gib-status/utils/helpers.jsx - About 1 hr to fix

                        Function validateDate has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          errors,
                          dateString,
                          formData,
                          schema,
                          errorMessages,
                        Severity: Major
                        Found in src/platform/forms-system/src/js/validation.js - About 1 hr to fix

                          Function userNavReducer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function userNavReducer(state = initialState, action) {
                            switch (action.type) {
                              case TOGGLE_FORM_SIGN_IN_MODAL:
                                return set('showFormSignInModal', action.isOpen, state);
                          
                          
                          Severity: Minor
                          Found in src/platform/site-wide/user-nav/reducers/index.js - About 1 hr to fix

                            Function handleVaChange has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const handleVaChange = e => {
                                const fileFromEvent = e.detail.files[0];
                                if (!fileFromEvent) {
                                  file = null;
                                  setError(mappedProps.error);

                              Function constructor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                constructor(props) {
                                  super(props);
                              
                                  // Throw an error if there’s no viewField (should be React component)
                                  if (!isReactComponent(this.props.uiSchema['ui:options'].viewField)) {
                              Severity: Minor
                              Found in src/platform/forms-system/src/js/fields/ArrayField.jsx - About 1 hr to fix

                                Function setDismissedHCANotification has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function setDismissedHCANotification(status, statusEffectiveAt) {
                                  return (dispatch, getState) => {
                                    const hasPreviouslyDismissedNotification = !!dismissedHCANotificationDate(
                                      getState(),
                                    );
                                Severity: Minor
                                Found in src/platform/user/profile/actions/hca.js - About 1 hr to fix

                                  Function addressValidationSuccessSingleBadUnitNumber has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    addressValidationSuccessSingleBadUnitNumber() {
                                      return asyncReturn(
                                        {
                                          addresses: [
                                            {
                                  Severity: Minor
                                  Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 1 hr to fix

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

                                      render() {
                                        const props = this.props;
                                    
                                        if (props.formContext.reviewMode) {
                                          return (
                                    Severity: Minor
                                    Found in src/platform/forms-system/src/js/widgets/ArrayCountWidget.jsx - About 1 hr to fix

                                      Function renderedProperties has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            objectFields => {
                                              const [first, ...rest] = objectFields;
                                              // expand under functionality is controlled in the reducer by setting ui:collapsed, so
                                              // we can check if its expanded by seeing if there are any visible "children"
                                              const visible = rest.filter(
                                      Severity: Minor
                                      Found in src/platform/forms-system/src/js/review/ObjectField.jsx - About 1 hr to fix

                                        Function addressValidationSuccessSingleMissingUnitNumber has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          addressValidationSuccessSingleMissingUnitNumber() {
                                            return asyncReturn(
                                              {
                                                addresses: [
                                                  {
                                        Severity: Minor
                                        Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language