department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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

        const handleSelectionChange = selection => {
          const highestRankTemp =
            typeof selection === 'string' ? selection : selection.key;
          if (selection.key)
            setRank(`${selection.key.toUpperCase()} - ${selection.value}`);

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

              export const getBlueButtonReportData = () => async dispatch => {
                try {
                  const response = await getDataForBlueButton();
                  dispatch({
                    type: Actions.LabsAndTests.GET_LIST,
              Severity: Minor
              Found in src/applications/mhv-medical-records/actions/blueButtonReport.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 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 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 ui:description has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          'ui:description': () => {
                            return (
                              <div className="vads-u-margin-y--3">
                                <va-accordion uswds bordered open-single>
                                  <va-accordion-item

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

                        function AutoSSO(props) {
                          const {
                            authenticatedWithOAuth,
                            hasCalledKeepAlive,
                            transactionId,
                        Severity: Minor
                        Found in src/platform/site-wide/user-nav/containers/AutoSSO.jsx - About 1 hr to fix

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

                          export const onSearch = componentState => {
                            const savedSuggestions = componentState?.savedSuggestions || [];
                            const suggestions = componentState?.suggestions || [];
                            const searchTerm = componentState?.inputValue;
                            const validSuggestions =
                          Severity: Minor
                          Found in src/platform/site-wide/header/helpers/index.js - About 1 hr to fix

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

                              const onSuggestionSubmit = (index, componentState) => {
                                const savedSuggestions = componentState?.savedSuggestions || [];
                                const suggestions = componentState?.suggestions || [];
                                const inputValue = componentState?.inputValue;
                            
                            
                            Severity: Minor
                            Found in src/platform/site-wide/header/components/Search/index.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

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

                                export const onSuggestionSubmit = (index, componentState) => {
                                  const savedSuggestions = componentState?.savedSuggestions || [];
                                  const suggestions = componentState?.suggestions || [];
                                  const searchTerm = componentState?.inputValue;
                                
                                
                                Severity: Minor
                                Found in src/platform/site-wide/header/helpers/index.js - About 1 hr to fix

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

                                    const onInputSubmit = componentState => {
                                      const savedSuggestions = componentState?.savedSuggestions || [];
                                      const suggestions = componentState?.suggestions || [];
                                      const inputValue = componentState?.inputValue;
                                      const validSuggestions =
                                  Severity: Minor
                                  Found in src/platform/site-wide/header/components/Search/index.js - About 1 hr to fix

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

                                    async function overrideAnimations(client) {
                                      const styles = `* {
                                         -o-transition-property: none !important;
                                         -moz-transition-property: none !important;
                                         -ms-transition-property: none !important;
                                    Severity: Minor
                                    Found in src/platform/testing/e2e-puppeteer/helpers.js - About 1 hr to fix

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

                                      export const updateFormDataAddress = (
                                        oldFormData,
                                        formData,
                                        path,
                                        index = null, // this is included in the path, but added as

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

                                                replaceSchema: (formData, schema, _uiSchema, index, path) => {
                                                  if (schema.maxLength) {
                                                    cityMaxLength = schema.maxLength;
                                                  }
                                                  const addressPath = getAddressPath(path); // path is ['address', 'currentField']
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language