department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,731 of 12,808 total issues

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

export const convertChemHemObservation = record => {
  const results = isArrayAndHasItems(record.result)
    ? record.result.map(item =>
        extractContainedResource(record, item.reference),
      )
Severity: Minor
Found in src/applications/mhv-medical-records/reducers/labsAndTests.js - About 1 hr to fix

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

      renderResultsList() {
        const { results, loading } = this.props.search;
        const query = this.props.router?.location?.query?.query || '';
        if (loading) {
          return <va-loading-indicator message="Loading results..." />;
    Severity: Minor
    Found in src/applications/search/containers/SearchApp.jsx - About 1 hr to fix

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

        const generateInfoSection = (doc, parent) => {
          const infoSection = doc.struct('Sect', {
            title: 'Information',
          });
          infoSection.add(
        Severity: Minor
        Found in src/platform/pdf/templates/blue_button_report.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 handleSubmit has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const handleSubmit = event => {
                  if (!event.target.value) {
                    setInputError(true);
                    return;
                  }
              Severity: Minor
              Found in src/applications/resources-and-support/components/SearchBar.jsx - About 1 hr to fix

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

                export function transform(formConfig, form) {
                  // https://dev-developer.va.gov/explore/appeals/docs/decision_reviews?version=current
                  const mainTransform = formData => {
                    const informalConference = showNewHlrContent(formData)
                      ? formData.informalConferenceChoice === 'yes'
                Severity: Minor
                Found in src/applications/appeals/996/config/submit-transformer.js - About 1 hr to fix

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

                  export const answerReviewLabel = (key, formValues) => {
                    const answer = formValues[key];
                  
                    const dischargeMonth =
                      monthLabelMap[formValues[SHORT_NAME_MAP.DISCHARGE_MONTH]] || '';
                  Severity: Minor
                  Found in src/applications/discharge-wizard/helpers/index.jsx - About 1 hr to fix

                    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) {

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

                        export default function ClaimantContactInformation(props) {
                          const formikContext = useFormikContext();
                        
                          return (
                            <>
                        Severity: Minor
                        Found in src/applications/burial-poc-v6/pages/ClaimantContactInformation.jsx - About 1 hr to fix

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

                          export default function additionalBenefits(schema, options) {
                            // Use the defaults as necessary, but override with the options given
                            const mergedOptions = { ...defaults, ...options };
                            const { fields, required } = mergedOptions;
                          
                          
                          Severity: Minor
                          Found in src/applications/edu-benefits/pages/additionalBenefits.js - About 1 hr to fix

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

                            export const mapEnrollmentVerificationsForSubmission = ev => {
                              // The enrollments are in order with the most recent first.  Look
                              // for the first non-null verificationStatus (or, the most recent
                              // month) that was verified as either correct or incorrect.
                              const mostRecentVerifiedEnrollmentIndex = ev.enrollmentVerifications.findIndex(
                            Severity: Minor
                            Found in src/applications/enrollment-verification/helpers/index.js - About 1 hr to fix

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

                              export function applicantHasInsuranceSchema(isPrimary) {
                                const keyname = isPrimary ? 'applicantHasPrimary' : 'applicantHasSecondary';
                                return {
                                  uiSchema: {
                                    ...titleUI(

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

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

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

                                  export function fetchRatedDisabilities() {
                                    return async dispatch => {
                                      const response = await getData(
                                        '/disability_compensation_form/rated_disabilities',
                                      );
                                  Severity: Minor
                                  Found in src/applications/rated-disabilities/actions/index.js - About 1 hr to fix

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

                                    const createRoutesWithStore = () => {
                                      return (
                                        <Switch>
                                          {routes.map((route, i) => {
                                            const options = {
                                    Severity: Minor
                                    Found in src/applications/check-in/travel-claim/routes.jsx - About 1 hr to fix

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

                                      const BackButton = props => {
                                        const { action, prevUrl, router, text = null } = props;
                                        const {
                                          getCurrentPageFromRouter,
                                          getPreviousPageFromRouter,
                                      Severity: Minor
                                      Found in src/applications/check-in/components/BackButton.jsx - About 1 hr to fix

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

                                        const RogersStem = () => {
                                          useEffect(() => {
                                            recordEvent({
                                              event: 'howToWizard-alert-displayed',
                                              'reason-for-alert': 'help with STEM program debt',
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language