department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function handleCompareUpdate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleCompareUpdate = e => {
    if (e.target.checked && !compareChecked) {
      if (compare.search.loaded.length === 3) {
        recordEvent({
          event: 'gibct-form-change',
Severity: Minor
Found in src/applications/gi/containers/ProfilePageHeader.jsx - About 1 hr to fix

    Function fetchSearchByNameResults has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function fetchSearchByNameResults(name, page, filters, version) {
      const params = { name, page, ...rubyifyKeys(buildSearchFilters(filters)) };
      if (version) {
        params.version = version;
      }
    Severity: Minor
    Found in src/applications/gi/actions/index.js - About 1 hr to fix

      Function handleCompareUpdate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const handleCompareUpdate = e => {
          if (e.target.checked && !compareChecked) {
            if (compareLength === 3) {
              recordEvent({
                event: 'gibct-form-change',
      Severity: Minor
      Found in src/applications/gi/containers/search/ResultCard.jsx - About 1 hr to fix

        Function renderMilitaryDetails has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const renderMilitaryDetails = () => {
            const name = 'Your military details';
        
            return (
              <AccordionItem

          Function vetTecCheckbox has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const vetTecCheckbox = (
            vettec,
            preferredProvider,
            handleVetTecChange,
            handlePreferredProviderChange,
          Severity: Minor
          Found in src/applications/gi/containers/FilterYourResults.jsx - About 1 hr to fix

            Function handleScroll has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                const handleScroll = () => {
                  const topOffset =
                    document
                      .getElementById('estimate-your-benefits-accordion')
                      ?.getBoundingClientRect().top -
            Severity: Minor
            Found in src/applications/gi/containers/CalculateYourBenefits.jsx - About 1 hr to fix

              Function otherCheckboxes has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function otherCheckboxes(
                handleVetTechPreferredProviderChange,
                options,
                smallScreen,
                automatedTest = false,
              Severity: Minor
              Found in src/applications/gi/containers/search/FilterBeforeResults.jsx - About 1 hr to fix

                Function FourthFAQSection has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const FourthFAQSection = () => {
                  return (
                    <>
                      <h3 className="dhp-faq-section-header">Feedback</h3>
                      <va-accordion
                Severity: Minor
                Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 1 hr to fix

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

                    render() {
                      return (
                        <div className="calculator-form">
                          <p>Use the fields below to update your benefits.</p>
                          {this.renderApprovedProgramsSelector()}

                    Function editAddressSuccess has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      rest.post(`${prefix}/v0/profile/address_validation`, (req, res, ctx) => {
                        return res(
                          ctx.json({
                            addresses: [
                              {
                    Severity: Minor
                    Found in src/applications/personalization/profile/msw-mocks.js - About 1 hr to fix

                      Function generateAllergyTextContent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const generateAllergyTextContent = () => {
                          if (isAcceleratingAllergies) {
                            return `
                            ${crisisLineHeader}\n\n
                            ${allergyData.name}\n
                      Severity: Minor
                      Found in src/applications/mhv-medical-records/containers/AllergyDetails.jsx - About 1 hr to fix

                        Function formatAppointmentsContentToText has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const formatAppointmentsContentToText = content => {
                          const sections = content.results.items;
                        
                          // Preface text
                          const { preface } = content.results;

                          Function convertAdmissionAndDischargeDetails has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const convertAdmissionAndDischargeDetails = record => {
                            const summary = getNote(record);
                          
                            const admissionDate = getAdmissionDate(record, summary);
                            const dischargeDate = getDischargeDate(record, summary);

                            Function getClaims has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function getClaims() {
                              const startTimestampMs = Date.now();
                            
                              return dispatch => {
                                dispatch({ type: FETCH_CLAIMS_PENDING });
                            Severity: Minor
                            Found in src/applications/personalization/dashboard/actions/claims.js - About 1 hr to fix

                              Function labAndTestDetails has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const labAndTestDetails = useMemo(() => {
                                  return {
                                    name: 'ANKLE LEFT 3 VIEWS',
                                    category: 'Radiology',
                                    orderedBy: 'DOE, JANE A',

                                Function imageAlertProcessing has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const imageAlertProcessing = imageRequest => {
                                    const percent =
                                      imageRequest.status === studyJobStatus.NEW
                                        ? 0
                                        : imageRequest.percentComplete;

                                  Function LastFilledInfo has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const LastFilledInfo = rx => {
                                    const { dispStatus, orderedDate, sortedDispensedDate } = rx;
                                    let nonVA = false;
                                    let showLastFilledDate = false;
                                    if (dispStatus === dispStatusObj.nonVA) {

                                    Function generatePDF has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const generatePDF = async formData => {
                                      const transformedFormData = pdfTransform(formData);
                                    
                                      const apiSettings = {
                                        mode: 'cors',
                                    Severity: Minor
                                    Found in src/applications/representative-appoint/api/generatePDF.js - About 1 hr to fix

                                      Function autoExpandAccordionPanelByUrlHash has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function autoExpandAccordionPanelByUrlHash() {
                                        const { hash } = document.location;
                                      
                                        if (!hash) {
                                          return;
                                      Severity: Minor
                                      Found in src/platform/site-wide/legacy-component-js/accordion.js - About 1 hr to fix

                                        Function addNewArrayItem has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const addNewArrayItem = $form => {
                                          // Get all array types on the current page.
                                          const arrayTypeRoots = $form.find('div[name^="topOfTable_root_"]');
                                        
                                          // Find the last entry for each array type, use its index to figure out
                                        Severity: Minor
                                        Found in src/platform/testing/e2e/cypress/support/form-tester/index.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language