department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function questionStatus has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const questionStatus = () => {
    if (hasError) {
      return (
        <>
          <p>
Severity: Major
Found in src/applications/ask-va/containers/IntroductionPage.jsx - About 2 hrs to fix

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

      const updateFormData = e => {
        e.preventDefault();
        if (isEditing) {
          // find the one we are editing in the employeeRecords array
          const updatedRecords = employmentRecords.map((item, arrayIndex) => {

      Function AuthorizedRoutes has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const AuthorizedRoutes = () => {
        const contactListPage = useSelector(
          state =>
            state.featureToggles[
              FEATURE_FLAG_NAMES.mhvSecureMessagingEditContactList
      Severity: Major
      Found in src/applications/mhv-secure-messaging/containers/AuthorizedRoutes.jsx - About 2 hrs to fix

        Function RemoveAttachmentModal has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const RemoveAttachmentModal = props => {
          return (
            <VaModal
              id={`remove-attachment-modal${
                props.draftSequence ? `-${props.draftSequence}` : ''

          Function conditionReducer has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const conditionReducer = (state = initialState, action) => {
            switch (action.type) {
              case Actions.Conditions.GET: {
                return {
                  ...state,
          Severity: Major
          Found in src/applications/mhv-medical-records/reducers/conditions.js - About 2 hrs to fix

            Function buildNonVAPrescriptionPDFList has 63 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const buildNonVAPrescriptionPDFList = prescription => {
              return [
                {
                  sections: [
                    {
            Severity: Major
            Found in src/applications/mhv-medications/util/pdfConfigs.js - About 2 hrs to fix

              File index.js has 271 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import React from 'react';
              import { parseISO, startOfDay } from 'date-fns';
              import { format, utcToZonedTime } from 'date-fns-tz';
              import { ELIGIBILITY } from './eligibility';
              import { VISTA_CHECK_IN_STATUS_IENS } from '../appConstants';
              Severity: Minor
              Found in src/applications/check-in/utils/appointment/index.js - About 2 hrs to fix

                File toxicExposure.jsx has 271 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React from 'react';
                import {
                  capitalizeEachWord,
                  formSubtitle,
                  formTitle,

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

                    render() {
                      const {
                        columnThreeLinkClicked,
                        href,
                        linkClicked,
                  Severity: Major
                  Found in src/platform/site-wide/mega-menu/components/MenuSection.jsx - About 2 hrs to fix

                    Function updateUiSchema has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          updateUiSchema: formData => {
                            const arrayData = formData?.[arrayPath];
                            return arrayData?.length
                              ? {
                                  'ui:title':

                      Function paginatedThreads has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const paginatedThreads = (req, res) => {
                        const { index } = req.params;
                        const { pageSize, pageNumber, sortField, sortOrder } = req.query;
                      
                        const sortFunc = (a, b) => {
                      Severity: Major
                      Found in src/platform/mhv/api/mocks/secure-messaging/threads/index.js - About 2 hrs to fix

                        File profileAddress.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                         * This uiSchema is modeled after how addresses are handled in the Profile application, and makes the same pattern
                         * available for use inside forms generated by the platform's form system.
                         */
                        
                        
                        Severity: Minor
                        Found in src/platform/forms-system/src/js/definitions/profileAddress.js - About 2 hrs to fix

                          Function searchWithBounds has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            static searchWithBounds(
                              address = null,
                              bounds,
                              locationType,
                              serviceType,
                          Severity: Major
                          Found in src/applications/facility-locator/api/LocatorApi.js - About 2 hrs to fix

                            Function onAddFile has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const onAddFile = async (event, index = null, password) => {
                                if (event.target?.files?.length) {
                                  // Only upload the first file; when va-file-input v3 supports multiple
                                  // files, we'll need to update this entire component
                                  const currentFile = event.target.files[0];
                            Severity: Major
                            Found in src/applications/appeals/shared/components/FileField.jsx - About 2 hrs to fix

                              Function InterstitialChanges has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export default function InterstitialChanges() {
                                const [userEmails, setUserEmails] = useState({});
                                const [isLoading, setIsLoading] = useState(true);
                                const [error, setError] = useState(false);
                              
                              
                              Severity: Major
                              Found in src/applications/sign-in-changes/containers/InterstitialChanges.jsx - About 2 hrs to fix

                                Function ClaimantInformation has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function ClaimantInformation(props) {
                                  const { values, setFieldValue } = useFormikContext();
                                  const getOptions = [
                                    { label: 'Spouse', value: 'spouse', key: 1 },
                                    { label: 'Child', value: 'child', key: 2 },
                                Severity: Major
                                Found in src/applications/burial-poc-v6/pages/ClaimantInformation.jsx - About 2 hrs to fix

                                  Function sortTheResults has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const sortTheResults = (sortByPropertyName, indexA, indexB) => {
                                    // -n (negative number) sorts indexA to the front of the array.
                                    // n (positive number) sorts indexA to the back of the array.
                                    // stayPut keeps both indexA and indexB right where they are.
                                    const [
                                  Severity: Major
                                  Found in src/applications/find-forms/helpers/index.js - About 2 hrs to fix

                                    Function RadioWidget has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export default function RadioWidget(props) {
                                      const { options, formContext = {}, value, disabled, onChange, id } = props;
                                      const { enumOptions, labels = {} } = options;
                                    
                                      const onReviewPage = formContext?.onReviewPage || false;
                                    Severity: Major
                                    Found in src/applications/pre-need/components/PreparerRadioWidget.jsx - About 2 hrs to fix

                                      Function EditVeteranAddressBase has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const EditVeteranAddressBase = props => {
                                        const dispatch = useDispatch();
                                      
                                        const { location } = props;
                                        const fromReviewPage = location?.query?.review;

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

                                          const updateFormData = () => {
                                            const { from: startDate, to: endDate, isCurrent } = employmentRecord;
                                        
                                            // Check validity
                                            if (
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language