department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,848 of 12,848 total issues

Function generateTitleSection has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const generateTitleSection = (doc, parent, data) => {
  const titleSection = doc.struct('Sect', {
    title: 'Introduction',
  });
  parent.add(titleSection);
Severity: Minor
Found in src/platform/pdf/templates/blue_button_report.js - About 1 hr to fix

    Function generateResultsContent has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const generateResultsContent = async (doc, parent, data) => {
      for (const resultItem of data.results) {
        const results = doc.struct('Sect', {
          title: resultItem.header || 'Results',
        });
    Severity: Minor
    Found in src/platform/pdf/templates/medications.js - About 1 hr to fix

      Function Main has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const Main = props => {
        const { hidden } = props.display;
      
        return (
          <div>
      Severity: Minor
      Found in src/platform/site-wide/mobile-menu-button/containers/Main.jsx - About 1 hr to fix

        Function subscribeComponentAnalyticsEvents has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function subscribeComponentAnalyticsEvents(
          e,
          recordEvent = _recordEvent,
        ) {
          // Is it a component we are tracking?
        Severity: Minor
        Found in src/platform/site-wide/component-library-analytics-setup.js - About 1 hr to fix

          Function relationshipToVeteranUI has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const relationshipToVeteranUI = options => {
            const { personTitle, labelHeaderLevel } =
              typeof options === 'object' ? options : { personTitle: options };
            const person = personTitle ?? 'Veteran';
          
          

            Function renderFacilityInfo has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              renderFacilityInfo() {
                const { facility } = this.props;
                const {
                  name,
                  website,
            Severity: Minor
            Found in src/applications/facility-locator/containers/FacilityDetail.jsx - About 1 hr to fix

              Function renderBreadcrumbs has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                renderBreadcrumbs(location, selectedResult) {
                  // Map and name props for the search query object
                  const {
                    currentPage: page,
                    context,
              Severity: Minor
              Found in src/applications/facility-locator/containers/FacilityLocatorApp.jsx - About 1 hr to fix

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

                export const mapStateToProps = (state, ownProps) => {
                  const currentPageNumber = selectCurrentPageNumber(state);
                  const errorMessages = selectFacilityCodeErrorMessages(ownProps);
                  const facilityCodeSelected = ownProps.formData
                    ? ownProps.formData.facilityCode

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

                    render() {
                      const { submission, data } = this.props.form;
                      const { response } = submission;
                      const name = data.fullName;
                  
                  

                    Function applicantProviderSchema has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function applicantProviderSchema(isPrimary) {
                      const keyname1 = isPrimary
                        ? 'applicantPrimaryProvider'
                        : 'applicantSecondaryProvider';
                      const keyname2 = isPrimary

                      Function applicantInsurancePrescriptionSchema has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function applicantInsurancePrescriptionSchema(isPrimary) {
                        const keyname = isPrimary
                          ? 'applicantPrimaryHasPrescription'
                          : 'applicantSecondaryHasPrescription';
                        const provider = isPrimary

                        Function fetchNearbyVALocations has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            async () => {
                              if (hasAnyMultiData(props)) {
                                return;
                              }
                              const { mainAddress } = props;

                          Function fetchTotalDisabilityRating has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function fetchTotalDisabilityRating(recordAnalyticsEvent = recordEvent) {
                            return async dispatch => {
                              dispatch({
                                type: FETCH_TOTAL_RATING_STARTED,
                              });
                          Severity: Minor
                          Found in src/applications/rated-disabilities/actions/index.js - About 1 hr to fix

                            Function SubmissionErrorAlert has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const SubmissionErrorAlert = () => {
                              useEffect(() => {
                                focusElement('.hca-error-message');
                              }, []);
                            
                            
                            Severity: Minor
                            Found in src/applications/hca/components/FormAlerts/SubmissionErrorAlert.jsx - About 1 hr to fix

                              Function ActionItemDisplay has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const ActionItemDisplay = props => {
                                const { router } = props;
                                const dispatch = useDispatch();
                                const selectApp = useMemo(makeSelectApp, []);
                                const { app } = useSelector(selectApp);
                              Severity: Minor
                              Found in src/applications/check-in/components/ActionItemDisplay.jsx - About 1 hr to fix

                                Function createRoutesWithStore has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const createRoutesWithStore = () => {
                                  return (
                                    <Switch>
                                      {routes.map((route, i) => {
                                        const options = { appName: APP_NAMES.CHECK_IN };
                                Severity: Minor
                                Found in src/applications/check-in/day-of/routes.jsx - About 1 hr to fix

                                  Function PreCheckinConfirmation has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const PreCheckinConfirmation = props => {
                                    const { appointments, isLoading, router } = props;
                                    const selectForm = useMemo(makeSelectForm, []);
                                    const currentForm = useSelector(selectForm);
                                    const { t } = useTranslation();
                                  Severity: Minor
                                  Found in src/applications/check-in/components/PreCheckinConfirmation.jsx - About 1 hr to fix

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

                                      render() {
                                        const { calculatedRating } = this.props;
                                        const placeholder = '--';
                                    
                                        return (

                                      Function UpcomingAppointmentsListItemAction has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const UpcomingAppointmentsListItemAction = props => {
                                        const { appointment, router } = props;
                                        const { t } = useTranslation();
                                        const dispatch = useDispatch();
                                        const { goToNextPage, jumpToPage, getNextPageFromRouter } = useFormRouting(

                                        Function flowPages has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const flowPages = (obj, list, path) => {
                                          const pages = _.cloneDeep(obj);
                                          const flowGroup = {};
                                          const flowGroupName = path
                                            .split('-')
                                        Severity: Minor
                                        Found in src/applications/ask-va/config/schema-helpers/formFlowHelper.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language