department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

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

  render() {
    if (isEmpty(this.props.calculated)) {
      return (
        <VaLoadingIndicator
          data-testid="loading-indicator"
Severity: Minor
Found in src/applications/gi/containers/VetTecEstimateYourBenefits.jsx - About 1 hr to fix

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

      render() {
        const { events, missingEvents } = this.props;
        const { expanded } = this.state;
        let pastEventsList = [];
        if (events.length) {
    Severity: Minor
    Found in src/applications/claims-status/components/appeals-v2/Timeline.jsx - About 1 hr to fix

      Function doSearch has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const doSearch = event => {
          if (event) {
            event.preventDefault();
            onApplyFilterClick();
            setShowFiltersBeforeSearch(false);
      Severity: Minor
      Found in src/applications/gi/containers/search/LocationSearchForm.jsx - About 1 hr to fix

        Function RatingsAbout has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const RatingsAbout = () => {
          return (
            <div className="vads-u-padding-top--4 about-ratings">
              <div className="small-screen:vads-u-font-size--h3 vads-u-padding-bottom--1p5 vads-u-font-weight--bold vads-u-font-family--serif small-screen-font">
                About ratings

          Function generateRows has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const generateRows = signInServiceName => {
            const { link, label: buttonText } =
              SERVICE_PROVIDERS[signInServiceName] || {};
            return [
              {

            Function CollapsibleList has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const CollapsibleList = () => {
              return (
                <div id="SupportingFiles-collapsiblePanel">
                  <div className="input-section">
                    <div

              Function ViewDependentsList has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ViewDependentsList(props) {
                let mainContent;
                const manageDependentsToggle = props?.manageDependentsToggle ?? null;
                if (props.loading) {
                  mainContent = (

                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 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 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 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 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 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 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 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 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 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 fetchNearbyVALocations has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            async () => {
                                              if (hasAnyMultiData(props)) {
                                                return;
                                              }
                                              const { mainAddress } = props;
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language