department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function fetchDebts has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const fetchDebts = async dispatch => {
  const getDebts = () => {
    const options = {
      method: 'GET',
      credentials: 'include',
Severity: Minor
Found in src/applications/financial-status-report/actions/index.js - About 1 hr to fix

    Function YesVaMemorandum has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const YesVaMemorandum = props => {
      const { setWizardStatus } = props;
      useEffect(
        () => {
          setWizardStatus(WIZARD_STATUS_COMPLETE);

      Function YesIDES has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const YesIDES = props => {
        const { setWizardStatus } = props;
        useEffect(
          () => {
            setWizardStatus(WIZARD_STATUS_COMPLETE);

        Function StaticInformationReviewField has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const StaticInformationReviewField = props => {
          const [isLoggedIn, setIsLoggedIn] = useState();
          useEffect(
            () => {
              setIsLoggedIn(props.isLoggedIn);

          Function YesDisabilityRating has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const YesDisabilityRating = props => {
            const { setWizardStatus } = props;
            useEffect(
              () => {
                setWizardStatus(WIZARD_STATUS_COMPLETE);

            Function routeToPageInFlow has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function routeToPageInFlow(history, current, action, data) {
              return async (dispatch, getState) => {
                const pageFlow = getPageFlow(getState());
            
                dispatch({
            Severity: Minor
            Found in src/applications/vaos/covid-19-vaccine/flow.js - About 1 hr to fix

              Function getRecentlyClosedClaims has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const getRecentlyClosedClaims = claims => {
                return claims
                  .filter(isBenefitsClaimOrAppeal)
                  .filter(claim => {
                    // Check if this is an appeal, if so we want to filter it out
              Severity: Minor
              Found in src/applications/claims-status/components/ClosedClaimMessage.jsx - About 1 hr to fix

                Function onAllComplete has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            onAllComplete: () => {
                              const now = new Date(Date.now());
                              const uploadDate = buildDateFormatter()(now.toISOString());
                              if (!hasError) {
                                recordEvent({
                Severity: Minor
                Found in src/applications/claims-status/actions/index.js - About 1 hr to fix

                  Function getPageFlow has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function getPageFlow(referralId) {
                    return {
                      appointments: {
                        url: '/',
                        label: 'Appointments',
                  Severity: Minor
                  Found in src/applications/vaos/referral-appointments/flow.js - About 1 hr to fix

                    Function renderBuyUp has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const renderBuyUp = () => {
                        if (!displayedInputs.buyUp) return null;
                    
                        const buyUpAmountId = 'buyUpAmount';
                        const buyUpFieldId = `${buyUpAmountId}-field`;

                      Function mapper has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  mapper: institution => {
                                    const hasFlags = institution.cautionFlags.length > 0;
                                    return (
                                      <div className="vads-u-display--flex">
                                        <div className="caution-flag-icon vads-u-flex--1">
                      Severity: Minor
                      Found in src/applications/gi/containers/CompareLayout.jsx - About 1 hr to fix

                        Function getCalculatedBenefits has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          (inputs, constants, institution) => {
                            const avgDodBah = constants ? constants.AVGDODBAH : 0;
                            const tfCap = constants ? constants.TFCAP : 0;
                        
                            const { vetTecTuitionFees, vetTecScholarships } = inputs;
                        Severity: Minor
                        Found in src/applications/gi/selectors/vetTecCalculator.js - About 1 hr to fix

                          Function addressReducer has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function addressReducer(state = initialState, action) {
                            switch (action.type) {
                              case ADDRESS_VALIDATION_START:
                                return {
                                  ...state,

                            Function generateHeaderBanner has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const generateHeaderBanner = async (doc, header, data, config) => {
                              doc.moveDown(1);
                              const currentHeight = doc.y;
                            
                              // Calculate text width
                            Severity: Minor
                            Found in src/platform/pdf/templates/utils.js - About 1 hr to fix

                              Function currentOrPastDateUI has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const currentOrPastDateUI = options => {
                                const { title, errorMessages, required, ...uiOptions } =
                                  typeof options === 'object' ? options : { title: options };
                              
                                // if monthYearOnly is used, the schema pattern also needs

                                Function componentDidUpdate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  componentDidUpdate(prevProps) {
                                    const {
                                      fieldName,
                                      forceEditView,
                                      successCallback,

                                  Function renderPhoneNumber has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const renderPhoneNumber = (
                                    title,
                                    subTitle = null,
                                    phone,
                                    from,

                                    Function getContestableIssues has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const getContestableIssues = props => {
                                      const benefitType = props?.benefitType || DEFAULT_BENEFIT_TYPE;
                                      const newApi = props?.[NEW_API];
                                      return dispatch => {
                                        dispatch({ type: FETCH_CONTESTABLE_ISSUES_INIT });
                                    Severity: Minor
                                    Found in src/applications/appeals/995/actions/index.js - About 1 hr to fix

                                      Function displayConditionsMet has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const displayConditionsMet = (SHORT_NAME, formResponses) => {
                                        const displayConditionsForShortName = DISPLAY_CONDITIONS[SHORT_NAME];
                                        const questionRequirements = Object.keys(displayConditionsForShortName);
                                      
                                        if (questionRequirements.includes('FORK')) {

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

                                          render() {
                                            const { error, fetching, results, scopes } = this.props;
                                        
                                            // Show loading indicator if we are fetching.
                                            if (fetching) {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language