department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function generate has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const generate = async data => {
  validate(data);
  const doc = createAccessibleDoc(data, config);

  await registerVaGovFonts(doc);
Severity: Major
Found in src/platform/pdf/templates/self_entered_info.js - About 2 hrs to fix

    Function generateInfoForUnavailableRecords has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const generateInfoForUnavailableRecords = (infoSection, doc, data) => {
      doc.moveDown();
    
      infoSection.add(
        createHeading(doc, 'H2', config, 'Records not in this report', {
    Severity: Major
    Found in src/platform/pdf/templates/blue_button_report.js - About 2 hrs to fix

      Function vaTextInputFieldMapping has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function vaTextInputFieldMapping(props) {
        const {
          description,
          textDescription,
          DescriptionField,

        Function refreshTransaction has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function refreshTransaction(
          transaction,
          analyticsSectionName,
          _route = null,
        ) {
        Severity: Major
        Found in src/platform/user/profile/vap-svc/actions/transactions.js - About 2 hrs to fix

          Function renderServiceTypeDropdown has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const renderServiceTypeDropdown = () => {
              const { facilityType, serviceType, serviceTypeChanged } = currentQuery;
              const disabled = ![
                LocationType.HEALTH,
                LocationType.URGENT_CARE,
          Severity: Major
          Found in src/applications/facility-locator/components/SearchControls.jsx - About 2 hrs to fix

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

            export const ConfirmationPage = () => {
              resetStoredSubTask();
            
              return (
                <Toggler toggleName={Toggler.TOGGLE_NAMES.hlrConfirmationUpdate}>
            Severity: Major
            Found in src/applications/appeals/996/containers/ConfirmationPage.jsx - About 2 hrs to fix

              Function listItems has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const listItems = providers.map((item, index) => {
                  const { insuranceName, insurancePolicyHolderName } = item;
                  const srLabel = getInsuranceSrLabel(item);
                  const modalDescription = replaceStrValues(
                    content['insurance-modal-remove-description'],
              Severity: Major
              Found in src/applications/ezr/components/FormFields/InsurancePolicyList.jsx - About 2 hrs to fix

                Function listItems has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const listItems = providers.map((item, index) => {
                    const { insuranceName, insurancePolicyHolderName } = item;
                    const srLabel = getInsuranceSrLabel(item);
                    const modalDescription = replaceStrValues(
                      content['insurance-modal-remove-description'],

                  Function personalInfo has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const personalInfo = (state = initialState, action) => {
                    switch (action.type) {
                      case FETCH_PERSONAL_INFO:
                        return {
                          ...state,
                  Severity: Major
                  Found in src/applications/verify-your-enrollment/reducers/personalInfo.js - About 2 hrs to fix

                    Function OMBInfo has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const OMBInfo = () => {
                      const expDate = '07/31/2027';
                      const ombNum = '2900-0091';
                      const resBurden = '35';
                      return (

                      Function HouseholdFinancialOnboarding has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const HouseholdFinancialOnboarding = props => {
                        const {
                          goBack,
                          goForward,
                          contentBeforeButtons,
                      Severity: Major
                      Found in src/applications/hca/components/FormPages/FinancialInformation.jsx - About 2 hrs to fix

                        Function NextOfKin has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const NextOfKin = props => {
                          const { router } = props;
                          const { t } = useTranslation();
                        
                          const selectVeteranData = useMemo(makeSelectVeteranData, []);
                        Severity: Major
                        Found in src/applications/check-in/pre-check-in/pages/NextOfKin/index.jsx - About 2 hrs to fix

                          Function useSendDemographicsFlags has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const useSendDemographicsFlags = () => {
                            const selectApp = useMemo(makeSelectApp, []);
                            const { app } = useSelector(selectApp);
                            const [isLoading, setIsLoading] = useState(false);
                            const [isComplete, setIsComplete] = useState(false);
                          Severity: Major
                          Found in src/applications/check-in/hooks/useSendDemographicsFlags.jsx - About 2 hrs to fix

                            Function _override has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              _override: error => {
                                if (typeof error === 'string') {
                                  if (error?.endsWith('startDate') || error?.endsWith('endDate')) {
                                    const errorParts = error.split('.');
                                    if (error.startsWith('toxicExposure.gulfWar1990Details')) {
                            Severity: Major
                            Found in src/applications/disability-benefits/all-claims/reviewErrors.js - About 2 hrs to fix

                              Function updateFormData has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const updateFormData = e => {
                                  e.preventDefault();
                              
                                  const errorList = selectedDeductions
                                    .filter(

                                Function updateFormData has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const updateFormData = e => {
                                    e.preventDefault();
                                
                                    const errorList = selectedDeductions
                                      .filter(

                                  Function MessageThread has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const MessageThread = props => {
                                    const { messageHistory, isDraftThread } = props;
                                    const accordionRef = useRef();
                                    const [expanded, setExpanded] = useState('');
                                  

                                    Function AppointmentListSection has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function AppointmentListSection() {
                                      useManualScrollRestoration();
                                    
                                      const featureBreadcrumbUrlUpdate = useSelector(state =>
                                        selectFeatureBreadcrumbUrlUpdate(state),
                                    Severity: Major
                                    Found in src/applications/vaos/appointment-list/index.jsx - About 2 hrs to fix

                                      Function updateDropdowns has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const updateDropdowns = (
                                        category = 'all',
                                        location = 'all',
                                        multiples = [],
                                      ) => {
                                      Severity: Major
                                      Found in src/applications/gi/components/LicenseCertificationSearchForm.jsx - About 2 hrs to fix

                                        Function generateMilitaryHistoryContent has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const generateMilitaryHistoryContent = record => {
                                          return {
                                            title: record.eventTitle,
                                            details: [
                                              {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language