department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function addressValidationSuccessTwoInternational has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  addressValidationSuccessTwoInternational() {
    return asyncReturn(
      {
        addresses: [
          {
Severity: Minor
Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 1 hr to fix

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

      render() {
        const {
          chapters,
          form,
          formConfig,
    Severity: Minor
    Found in src/platform/forms-system/src/js/review/ReviewChapters.jsx - About 1 hr to fix

      Function initDDRum has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const initDDRum = () => {
        const env = environment.vspEnvironment();
      
        const {
          sessionReplaySampleRate = 1,
      Severity: Minor
      Found in src/platform/user/authentication/hooks/useDatadogRum.js - About 1 hr to fix

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

          render() {
            return (
              <Modal
                hideCloseButton
                id="session-timeout-modal"
        Severity: Minor
        Found in src/platform/user/authentication/components/SessionTimeoutModal.jsx - About 1 hr to fix

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

            render() {
              const { submission, data } = this.props.form;
              const { response } = submission;
              const name = data.veteranFullName;
          
          
          Severity: Minor
          Found in src/applications/mock-sip-form/containers/ConfirmationPage.jsx - About 1 hr to fix

            Function fetchDebtLettersVBMS has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const fetchDebtLettersVBMS = () => async dispatch => {
              dispatch(fetchDebtLettersInitiated());
              try {
                const options = {
                  method: 'GET',
            Severity: Minor
            Found in src/applications/combined-debt-portal/combined/actions/debts.js - About 1 hr to fix

              Function constructor has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                constructor(props) {
                  super(props);
                  // Throw an error if there’s no viewComponent (should be React component)
                  if (
                    !isReactComponent(get('ui:options.viewComponent', this.props.uiSchema))

                Function renderFacilityTypeDropdown has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const renderFacilityTypeDropdown = () => {
                    const { suppressPharmacies, suppressPPMS } = props;
                    const { facilityType, isValid, facilityTypeChanged } = currentQuery;
                    const locationOptions = suppressPPMS
                      ? nonPPMSfacilityTypeOptions
                Severity: Minor
                Found in src/applications/facility-locator/components/SearchControls.jsx - About 1 hr to fix

                  Function getEvidence has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const getEvidence = formData => {
                    const evidenceSubmission = {
                      evidenceType: [],
                    };
                    // Add VA evidence data
                  Severity: Minor
                  Found in src/applications/appeals/testing/sc/utils/submit.js - About 1 hr to fix

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

                      render() {
                        const { submission, data } = this.props.form;
                        const { response } = submission;
                        const name = data.veteranFullName;
                    
                    
                    Severity: Minor
                    Found in src/applications/sah/sahg/containers/ConfirmationPage.jsx - About 1 hr to fix

                      Function uploadWithInfoComponent has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function uploadWithInfoComponent(fileList, category, resources) {
                        return {
                          uiSchema: {
                            ...acceptableFileList(fileList || []),
                            'view:additionalResources': {

                        Function searchByCoordinates has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          static searchByCoordinates(
                            address = null,
                            lat,
                            long,
                            name,

                          Function updateMemDb has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const updateMemDb = (req, res = null) => {
                            const key = `${req.method} ${req.url}`;
                            const body = req.body || {};
                          
                            if (key === 'PUT /v0/profile/telephones') {

                            Function MailingAddressInfoPage has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const MailingAddressInfoPage = () => {
                              const mailingAddress = useSelector(selectVAPMailingAddress);
                            
                              const showSuccessAlert = window.sessionStorage.getItem(
                                'onReviewPageContactInfoEdit',

                              Function MailingAddressInfoPageTaskGreen has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const MailingAddressInfoPageTaskGreen = () => {
                                const mailingAddress = useSelector(selectVAPMailingAddress);
                              
                                const showSuccessAlert = window.sessionStorage.getItem(
                                  'onReviewPageContactInfoEdit',

                                Function customCOEsubmit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const customCOEsubmit = (formConfig, form) => {
                                  const formCopy = cloneDeep(form);
                                
                                  const { periodsOfService = [], relevantPriorLoans = [] } = formCopy.data;
                                
                                

                                  Function renderVaMedication has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const renderVaMedication = medication => {
                                    const facilityPhone = normalizePhoneNumber(medication.facilityPhone);
                                    const phoneNotClickable = !numberIsClickable(facilityPhone);
                                  
                                    return (
                                  Severity: Minor
                                  Found in src/applications/avs/components/YourHealthInformation.jsx - About 1 hr to fix

                                    Function customCOEsubmit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const customCOEsubmit = (formConfig, form) => {
                                      const formCopy = cloneDeep(form);
                                    
                                      const { periodsOfService = [], relevantPriorLoans = [] } = formCopy.data;
                                    
                                    
                                    Severity: Minor
                                    Found in src/applications/lgy/coe/form/config/helpers.js - About 1 hr to fix

                                      Function useRepresentativeStatus has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function useRepresentativeStatus() {
                                        const [representative, setRepresentative] = useState(null);
                                        const [isLoading, setIsLoading] = useState(true);
                                        const [error, setError] = useState(null);
                                      
                                      

                                        Function useDemographicsFlags has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const useDemographicsFlags = () => {
                                          const selectCurrentContext = useMemo(makeSelectCurrentContext, []);
                                          const context = useSelector(selectCurrentContext);
                                          const { token } = context;
                                        
                                        
                                        Severity: Minor
                                        Found in src/applications/check-in/hooks/useDemographicsFlags.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language