department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,811 of 12,811 total issues

Function addressValidationSuccess has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  addressValidationSuccess() {
    return asyncReturn(
      {
        addresses: [
          {
Severity: Major
Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 2 hrs to fix

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

      render() {
        const dataType = this.props.schema.type;
        if (dataType !== 'array') {
          throw new Error(`Data Type ${dataType} not supported.`);
        }
    Severity: Major
    Found in src/applications/my-education-benefits/components/AccordionField.jsx - About 2 hrs to fix

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

        render() {
          return (
            <div className="schemaform-intro">
              <FormTitle title="Opt out of sharing education benefits information" />
              <h4>
      Severity: Major
      Found in src/applications/edu-benefits/0993/containers/IntroductionPage.jsx - About 2 hrs to fix

        Function getFormSchema has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const getFormSchema = (formData = {}) => {
          const defaultCountry =
            countries.find(
              country => country.countryCodeISO3 === formData?.countryCodeIso3,
            )?.countryCodeISO3 || 'USA';
        Severity: Major
        Found in src/applications/verify-your-enrollment/components/addressSchema.js - About 2 hrs to fix

          Function MultipleIds has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const MultipleIds = () => {
            const content = {
              heading: 'It looks like you have more than one My HealtheVet account',
              alertText: (
                <div>

            Function useSendPreCheckInData has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const useSendPreCheckInData = () => {
              const selectForm = useMemo(makeSelectForm, []);
              const { data } = useSelector(selectForm);
              const [isLoading, setIsLoading] = useState(true);
              const {
            Severity: Major
            Found in src/applications/check-in/hooks/useSendPreCheckInData.jsx - About 2 hrs to fix

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

                render() {
                  const { route } = this.props;
                  const { formConfig, pageList } = route;
              
                  return (
              Severity: Major
              Found in src/applications/travel-pay/containers/IntroductionPage.jsx - About 2 hrs to fix

                File IntroductionPage.jsx has 280 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React, { useEffect } from 'react';
                
                import PropTypes from 'prop-types';
                import { useDispatch, useSelector } from 'react-redux';
                import { setData } from '~/platform/forms-system/src/js/actions';

                  Function FacilityConfirmation has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const FacilityConfirmation = props => {
                    const { data, goBack, goForward, goToPath } = props;
                    const selectedFacility = data['view:plannedClinic'].veteranSelected;
                    const selectedCaregiverSupportFacility =
                      data['view:plannedClinic'].caregiverSupport;

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

                      const updateFormData = () => {
                        if (
                          !isValidFromDate(employmentRecord.from) ||
                          (!isValidToDate(employmentRecord.from, employmentRecord.to) &&
                            !employmentRecord.isCurrent)

                      Function content has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const content = () => {
                          const folderCount = folders?.length;
                          if (folders === undefined) {
                            return (
                              <va-loading-indicator
                      Severity: Major
                      Found in src/applications/mhv-secure-messaging/containers/Folders.jsx - About 2 hrs to fix

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '14',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-14',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1142..1162
                        src/applications/ask-va/utils/mockData.js on lines 1314..1333
                        src/applications/ask-va/utils/mockData.js on lines 1376..1396
                        src/applications/ask-va/utils/mockData.js on lines 1397..1417
                        src/applications/ask-va/utils/mockData.js on lines 1418..1438
                        src/applications/ask-va/utils/mockData.js on lines 1439..1459
                        src/applications/ask-va/utils/mockData.js on lines 1481..1501
                        src/applications/ask-va/utils/mockData.js on lines 1502..1521
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '10',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-10',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1142..1162
                        src/applications/ask-va/utils/mockData.js on lines 1314..1333
                        src/applications/ask-va/utils/mockData.js on lines 1397..1417
                        src/applications/ask-va/utils/mockData.js on lines 1418..1438
                        src/applications/ask-va/utils/mockData.js on lines 1439..1459
                        src/applications/ask-va/utils/mockData.js on lines 1460..1480
                        src/applications/ask-va/utils/mockData.js on lines 1481..1501
                        src/applications/ask-va/utils/mockData.js on lines 1502..1521
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '12',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-12',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1142..1162
                        src/applications/ask-va/utils/mockData.js on lines 1314..1333
                        src/applications/ask-va/utils/mockData.js on lines 1376..1396
                        src/applications/ask-va/utils/mockData.js on lines 1397..1417
                        src/applications/ask-va/utils/mockData.js on lines 1439..1459
                        src/applications/ask-va/utils/mockData.js on lines 1460..1480
                        src/applications/ask-va/utils/mockData.js on lines 1481..1501
                        src/applications/ask-va/utils/mockData.js on lines 1502..1521
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '15',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-15',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1142..1162
                        src/applications/ask-va/utils/mockData.js on lines 1314..1333
                        src/applications/ask-va/utils/mockData.js on lines 1376..1396
                        src/applications/ask-va/utils/mockData.js on lines 1397..1417
                        src/applications/ask-va/utils/mockData.js on lines 1418..1438
                        src/applications/ask-va/utils/mockData.js on lines 1439..1459
                        src/applications/ask-va/utils/mockData.js on lines 1460..1480
                        src/applications/ask-va/utils/mockData.js on lines 1502..1521
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '11',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-11',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1142..1162
                        src/applications/ask-va/utils/mockData.js on lines 1314..1333
                        src/applications/ask-va/utils/mockData.js on lines 1376..1396
                        src/applications/ask-va/utils/mockData.js on lines 1418..1438
                        src/applications/ask-va/utils/mockData.js on lines 1439..1459
                        src/applications/ask-va/utils/mockData.js on lines 1460..1480
                        src/applications/ask-va/utils/mockData.js on lines 1481..1501
                        src/applications/ask-va/utils/mockData.js on lines 1502..1521
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '1',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-20240917-306466',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1314..1333
                        src/applications/ask-va/utils/mockData.js on lines 1376..1396
                        src/applications/ask-va/utils/mockData.js on lines 1397..1417
                        src/applications/ask-va/utils/mockData.js on lines 1418..1438
                        src/applications/ask-va/utils/mockData.js on lines 1439..1459
                        src/applications/ask-va/utils/mockData.js on lines 1460..1480
                        src/applications/ask-va/utils/mockData.js on lines 1481..1501
                        src/applications/ask-va/utils/mockData.js on lines 1502..1521
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '13',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-13',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1142..1162
                        src/applications/ask-va/utils/mockData.js on lines 1314..1333
                        src/applications/ask-va/utils/mockData.js on lines 1376..1396
                        src/applications/ask-va/utils/mockData.js on lines 1397..1417
                        src/applications/ask-va/utils/mockData.js on lines 1418..1438
                        src/applications/ask-va/utils/mockData.js on lines 1460..1480
                        src/applications/ask-va/utils/mockData.js on lines 1481..1501
                        src/applications/ask-va/utils/mockData.js on lines 1502..1521
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '8',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-8',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1142..1162
                        src/applications/ask-va/utils/mockData.js on lines 1376..1396
                        src/applications/ask-va/utils/mockData.js on lines 1397..1417
                        src/applications/ask-va/utils/mockData.js on lines 1418..1438
                        src/applications/ask-va/utils/mockData.js on lines 1439..1459
                        src/applications/ask-va/utils/mockData.js on lines 1460..1480
                        src/applications/ask-va/utils/mockData.js on lines 1481..1501
                        src/applications/ask-va/utils/mockData.js on lines 1502..1521
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 11 locations. Consider refactoring.
                        Open

                            {
                              id: '16',
                              type: 'inquiry',
                              attributes: {
                                inquiryNumber: 'A-16',
                        Severity: Major
                        Found in src/applications/ask-va/utils/mockData.js and 10 other locations - About 2 hrs to fix
                        src/applications/ask-va/utils/mockData.js on lines 1142..1162
                        src/applications/ask-va/utils/mockData.js on lines 1314..1333
                        src/applications/ask-va/utils/mockData.js on lines 1376..1396
                        src/applications/ask-va/utils/mockData.js on lines 1397..1417
                        src/applications/ask-va/utils/mockData.js on lines 1418..1438
                        src/applications/ask-va/utils/mockData.js on lines 1439..1459
                        src/applications/ask-va/utils/mockData.js on lines 1460..1480
                        src/applications/ask-va/utils/mockData.js on lines 1481..1501
                        src/applications/ask-va/utils/mockData.js on lines 1522..1541
                        src/applications/ask-va/utils/mockData.js on lines 1542..1561

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 89.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language