department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function requestProvidersList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function requestProvidersList(address) {
  return async (dispatch, getState) => {
    try {
      const location = address;
      const { newAppointment } = getState();
Severity: Minor
Found in src/applications/vaos/new-appointment/redux/actions.js - About 1 hr to fix

    Function resultCards has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        (institution, index) => {
          const { distance, name } = institution;
          const miles = Number.parseFloat(distance).toFixed(2);
          const { currentPage } = pagination;
    
    
    Severity: Minor
    Found in src/applications/gi/containers/search/LocationSearchResults.jsx - About 1 hr to fix

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

      export default function ConfirmationPage() {
        const dispatch = useDispatch();
        const {
          data,
          facilityDetails,

        Function getPageContent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          getPageContent() {
            const { claim } = this.props;
        
            // Return null if the claim/ claim.attributes dont exist
            if (!claimAvailable(claim)) {
        Severity: Minor
        Found in src/applications/claims-status/containers/FilesPage.jsx - About 1 hr to fix

          Function GET /vaos/v2/eligibility has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            'GET /vaos/v2/eligibility': (req, res) => {
              const isDirect = req.query.type === 'direct';
              const ineligibilityReasons = [];
          
              if (
          Severity: Minor
          Found in src/applications/vaos/services/mocks/index.js - About 1 hr to fix

            Function noResultsFound has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const noResultsFound = cnt => {
                const noResultsNoFilters = cnt === 0 && !usedFilters;
                const noResultsWithFilters = cnt === 0 && usedFilters;
            
                return (
            Severity: Minor
            Found in src/applications/gi/containers/search/LocationSearchResults.jsx - About 1 hr to fix

              Function schoolAttributes has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const schoolAttributes = () => {
                  const options = [
                    {
                      name: 'excludeCautionFlags',
                      checked: excludeCautionFlags,
              Severity: Minor
              Found in src/applications/gi/containers/FilterYourResults.jsx - About 1 hr to fix

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

                  render() {
                    if (!this.props.isVisible) return null;
                
                    const alertClass = classNames(
                      'usa-alert',
                Severity: Minor
                Found in src/applications/gi/components/AlertBox.jsx - About 1 hr to fix

                  Function CalcBeneficiaryLocationQuestionModalContent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function CalcBeneficiaryLocationQuestionModalContent() {
                    return (
                      <div>
                        <p>
                          VA pays monthly housing allowance (MHA) based on the campus location

                    Function GiBillBreadcrumbs has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const GiBillBreadcrumbs = () => {
                      const history = useHistory();
                      const { pathname } = useLocation();
                      const isSchools = pathname.includes('schools-and-employers');
                    
                    
                    Severity: Minor
                    Found in src/applications/gi/updated-gi/components/GiBillBreadcrumbs.jsx - About 1 hr to fix

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

                        render() {
                          const { programs } = this.props;
                      
                          if (programs && programs.length) {
                            return (

                        Function submitFormData has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function submitFormData(stateKey, payload) {
                          return async dispatch => {
                            dispatch({
                              type: FORM_DATA_SUBMIT_START,
                              status: LOADING_STATUS.pending,

                          Function getAppointmentTimezone has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function getAppointmentTimezone(appointment) {
                            if (appointment?.location) {
                              return {
                                identifier: appointment.location.attributes.timezone.timeZoneId,
                                abbreviation: getTimezoneAbbrByFacilityId(

                            Function parseCareSummariesAndNotes has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const parseCareSummariesAndNotes = (records, index = 2) => {
                              return `
                            ${index}) Care summaries and notes
                            
                            This report only includes care summaries and notes from 2013 and later.
                            Severity: Minor
                            Found in src/applications/mhv-medical-records/util/txtHelpers/notes.js - About 1 hr to fix

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

                                const downloadPdf = async () => {
                                  const formattedText = convertHtmlForDownload(
                                    htmlContent,
                                    DOWNLOAD_FORMAT.PDF,
                                  );

                                Function AllergiesErrorModal has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const AllergiesErrorModal = props => {
                                  const {
                                    onCloseButtonClick,
                                    onDownloadButtonClick,
                                    onCancelButtonClick,

                                  Function renderIndividual has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const renderIndividual = () => {
                                      return (
                                        <dl className="review">
                                          <div className="review-row">
                                            <dt>Name</dt>

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

                                      render() {
                                        const { form, formConfig, formContext, pageList, path, user } = this.props;
                                        const { CustomReviewTopContent, hideReviewChapters } = formConfig;
                                        const downtimeDependencies = get('downtime.dependencies', formConfig) || [];
                                    
                                    
                                    Severity: Minor
                                    Found in src/platform/forms/save-in-progress/RoutedSavableReviewPage.jsx - About 1 hr to fix

                                      Function saveForm has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function saveForm(saveType, formId, formData, version, returnUrl, submission) {
                                        const savedAt = Date.now();
                                      
                                        return (dispatch, getState) => {
                                          const { trackingPrefix } = getState().form;
                                      Severity: Minor
                                      Found in src/platform/forms/save-in-progress/actions.js - About 1 hr to fix

                                        Function fileInputUI has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const fileInputUI = stringOrOptions => {
                                          if (typeof stringOrOptions === 'string') {
                                            return {
                                              'ui:title': stringOrOptions,
                                              'ui:webComponentField': VaFileInputField,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language