department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

  render() {
    const { form } = this.props;
    const { submission, formId, data } = form;

    const { fullName } = data;
Severity: Minor
Found in src/applications/_mock-form/containers/ConfirmationPage.jsx - About 2 hrs to fix

    Function personalInfoPages has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const personalInfoPages = chapter => {
      const [nameAndDob, identificationInfo] = chapter.pages;
    
      /** @returns {PageSchema} */
      const nameAndDobPage = ({ includeDateOfBirth, pageTitle }) => {

      Function InsuranceInformation has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

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

          render() {
            if (this.state.loading) {
              return <va-loading-indicator message="Loading facilities..." />;
            }
        
        
        Severity: Minor
        Found in src/applications/static-pages/facilities/FacilityListWidget.jsx - About 2 hrs to fix

          Function validateLogin has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const validateLogin = async (
            lastName,
            dob,
            dobError,
            setLastNameError,
          Severity: Minor
          Found in src/applications/check-in/utils/validateVeteran/index.js - About 2 hrs to fix

            Function TravelQuestion has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const TravelQuestion = props => {
              const { router } = props;
              const { t } = useTranslation();
            
              const body = (
            Severity: Minor
            Found in src/applications/check-in/day-of/pages/TravelQuestion.jsx - About 2 hrs to fix

              Function ViewDependentsLayout has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ViewDependentsLayout(props) {
                let mainContent;
              
                if (props.loading) {
                  mainContent = (

                Function formatDate has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function formatDate(inputDate) {
                  if (!inputDate) return null;
                
                  const months = [
                    'January',
                Severity: Minor
                Found in src/applications/mhv-medical-records/reducers/selfEnteredData.js - About 2 hrs to fix

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

                  const generate = async data => {
                    validate(data);
                    const tocPageData = {};
                    const doc = createAccessibleDoc(data, config);
                  
                  
                  Severity: Minor
                  Found in src/platform/pdf/templates/blue_button_report.js - About 1 hr to fix

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

                      render() {
                        const { currentLocation, formConfig, children, loadedStatus } = this.props;
                        const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
                        const trimmedPathname = currentLocation.pathname.replace(/\/$/, '');
                        let content;
                    Severity: Minor
                    Found in src/platform/forms/save-in-progress/RoutedSavableApp.jsx - About 1 hr to fix

                      Function createRoutesWithSaveInProgress has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function createRoutesWithSaveInProgress(formConfig) {
                        const protectedRoutes = new Set([
                          'introduction',
                          'review-and-submit',
                          'confirmation',
                      Severity: Minor
                      Found in src/platform/forms/save-in-progress/helpers.js - About 1 hr to fix

                        Function GenericError has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function GenericError(props) {
                          const { appType, formConfig, onSubmit, testId } = props;
                          let submitButton;
                          let submitMessage;
                        
                        

                          Function MilitaryServiceHistory has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function MilitaryServiceHistory(props) {
                            const state = useFormikContext();
                          
                            const { from, to } = state.values.toursOfDuty[0].dateRange;
                          
                          
                          Severity: Minor
                          Found in src/applications/burial-poc-v6/pages/MilitaryServiceHistory.jsx - About 1 hr to fix

                            Function prefillTransformer has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function prefillTransformer(pages, formData, metadata, state) {
                              const {
                                user: {
                                  profile: {
                                    vapContactInfo: { residentialAddress, mailingAddress },
                            Severity: Minor
                            Found in src/applications/ezr/utils/helpers/prefill-transformer.js - About 1 hr to fix

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

                              const OMBInfo = () => {
                                const expDate = '07/31/2027';
                                const ombNum = '2900-0091';
                                const resBurden = '27';
                                return (
                              Severity: Minor
                              Found in src/applications/ezr/components/IntroductionPage/OMBInfo.jsx - About 1 hr to fix

                                Function createDirectDepositChangePage has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function createDirectDepositChangePage(schema) {
                                  const { bankAccountChange, bankAccount } = schema.definitions;
                                  return {
                                    title: 'Direct deposit',
                                    path: 'personal-information/direct-deposit',
                                Severity: Minor
                                Found in src/applications/edu-benefits/pages/directDepositChange.js - About 1 hr to fix

                                  Function contactInformation has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    contactInformation: formData => {
                                      if (_.isEmpty(_.get(formData, 'view:phoneAndEmail.homePhone', {}))) {
                                        recordEvent({
                                          event: 'edu-0994--response-missing',
                                          'missing-field-question':
                                  Severity: Minor
                                  Found in src/applications/edu-benefits/0994/analytics-functions.js - About 1 hr to fix

                                    Function transformForSubmit has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export default function transformForSubmit(formConfig, form) {
                                      const transformedData = JSON.parse(
                                        formsSystemTransformForSubmit(formConfig, form),
                                      );
                                    
                                    
                                    Severity: Minor
                                    Found in src/applications/ivc-champva/10-7959a/config/submitTransformer.js - About 1 hr to fix

                                      Function prefillTransformer has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function prefillTransformer(pages, formData, metadata, state) {
                                        const {
                                          user: {
                                            profile: {
                                              vapContactInfo: { residentialAddress, mailingAddress },

                                        Function renderSearchSection has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const renderSearchSection = () => {
                                            return (
                                              <div className="row search-section">
                                                <div className="title-section">
                                                  <h1>Find a VA accredited representative or VSO</h1>
                                        Severity: Minor
                                        Found in src/applications/representative-search/containers/SearchPage.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language