department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

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 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 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 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

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

                export const recipientsReducer = (state = initialState, action) => {
                  switch (action.type) {
                    case Actions.AllRecipients.GET_LIST: {
                      const {
                        associatedTriageGroups,
                Severity: Minor
                Found in src/applications/mhv-secure-messaging/reducers/recipients.js - About 1 hr to fix

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

                  export function checkCommunityCareEligibility() {
                    return async (dispatch, getState) => {
                      const state = getState();
                      const communityCareEnabled = selectFeatureCommunityCare(state);
                  
                  
                  Severity: Minor
                  Found in src/applications/vaos/new-appointment/redux/actions.js - About 1 hr to fix

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

                    export default function NeedHelp() {
                      return (
                        <div className="vads-u-margin-top--9 vads-u-margin-bottom--3">
                          <h2 className="vads-u-font-size--h3 vads-u-margin-bottom--0">
                            Need help?
                    Severity: Minor
                    Found in src/applications/vaos/components/NeedHelp.jsx - About 1 hr to fix

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

                        const renderFacilityTable = mainMap => {
                          const data = Array.of(createMainRow(mainMap.institution)).concat(
                            createBranchesAndExtensionsRows(mainMap, viewableRowCount),
                          );
                      
                      
                      Severity: Minor
                      Found in src/applications/gi/components/profile/SchoolLocations.jsx - About 1 hr to fix

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

                            const sections = Object.keys(perTerm).map(section => {
                              const {
                                visible,
                                title,
                                learnMoreAriaLabel,
                        Severity: Minor
                        Found in src/applications/gi/components/profile/EstimatedBenefits.jsx - About 1 hr to fix

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

                          export function fetchSearchByLocationCoords(
                            location,
                            coordinates,
                            distance,
                            filters,
                          Severity: Minor
                          Found in src/applications/gi/actions/index.js - About 1 hr to fix

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

                            function calculateTuition(constant, eligibility, institution, derived) {
                              if (derived.oldGiBill) {
                                return { qualifier: 'per year', value: 0, ratedQualifier: '/ year' };
                              }
                              if (institution.type === 'ojt') {
                            Severity: Minor
                            Found in src/applications/gi/selectors/estimator.js - About 1 hr to fix

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

                                function renderAddressOption(address, id = 'userEntered') {
                                  if (address !== undefined) {
                                    const { street, cityStateZip, country } =
                                      id !== 'userEntered'
                                        ? formatAddress(address)

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

                                      updateSchema: (formData, addressSchema, addressUiSchema, index, path) => {
                                        let currentSchema = addressSchema;
                                
                                        const modifiedData = { ...formData };
                                
                                
                                Severity: Minor
                                Found in src/applications/pre-need-integration/definitions/address.js - About 1 hr to fix

                                  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,
                                      });

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

                                      renderWebResult(result, snippetKey = 'snippet', isBestBet = false, index) {
                                        const strippedTitle = removeDoubleBars(
                                          formatResponseString(result.title, true),
                                        );
                                        return (
                                    Severity: Minor
                                    Found in src/applications/search/containers/SearchApp.jsx - About 1 hr to fix

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

                                        const searchResults = () => {
                                          if (loading) {
                                            return <va-loading-indicator message="Loading..." set-focus />;
                                          }
                                          if (representatives?.length) {

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

                                          const downloadPdf = async () => {
                                            const formattedText = convertHtmlForDownload(
                                              htmlContent,
                                              DOWNLOAD_FORMAT.PDF,
                                            );
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language