department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,819 of 12,819 total issues

Function Dependents has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Dependents = () => {
  useEffect(() => {
    recordEvent({
      event: 'howToWizard-alert-displayed',
      'reason-for-alert': 'request help with debt for spouses or dependents',
Severity: Major
Found in src/applications/financial-status-report/wizard/pages/Dependents.jsx - About 2 hrs to fix

    Function OtherAssetsInputList has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const OtherAssetsInputList = props => {
      const { errorSchema, formContext } = props;
      const errorList = errorSchema?.otherAssets?.__errors;
      const { submitted } = formContext;
    
    

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

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

        Function MonetaryInputList has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const MonetaryInputList = props => {
          const { errorSchema, formContext } = props;
          const errorList = errorSchema?.monetaryAssets?.__errors;
          const { submitted } = formContext;
        
        

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

            render() {
              let buttonText;
              let buttonDisabled;
              let message;
              switch (this.props.downloadStatus) {
          Severity: Major
          Found in src/applications/letters/components/DownloadLetterLink.jsx - About 2 hrs to fix

            Function EmergencyNote has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const EmergencyNote = props => {
              const { dropDownFlag } = props;
            
              const content = () => (
                <>
            Severity: Major
            Found in src/applications/mhv-secure-messaging/components/EmergencyNote.jsx - About 2 hrs to fix

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

                render() {
                  const {
                    appeal,
                    fullName,
                    appealsLoading,
              Severity: Major
              Found in src/applications/claims-status/containers/AppealInfo.jsx - About 2 hrs to fix

                Function toggleSMSNotificationsSuccess has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const toggleSMSNotificationsSuccess = (enrolled = true) => {
                  return [
                    rest.put(`${prefix}/v0/profile/telephones`, (req, res, ctx) => {
                      return res(
                        ctx.json({
                Severity: Major
                Found in src/applications/personalization/profile/msw-mocks.js - About 2 hrs to fix

                  Function folders has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function folders(state = initialState, action) {
                    switch (action.type) {
                      case FETCH_FOLDER_SUCCESS: {
                        const { attributes } = action.folder.data;
                        const messages = action.messages.data.map(message => message.attributes);
                  Severity: Major
                  Found in src/applications/personalization/dashboard/reducers/folders.js - About 2 hrs to fix

                    Function labsAndTestsReducer has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const labsAndTestsReducer = (state = initialState, action) => {
                      switch (action.type) {
                        case Actions.LabsAndTests.GET: {
                          return {
                            ...state,
                    Severity: Major
                    Found in src/applications/mhv-medical-records/reducers/labsAndTests.js - About 2 hrs to fix

                      Function MedicationsListSort has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const MedicationsListSort = props => {
                        const { value, sortRxList } = props;
                        const history = useHistory();
                        const showRefillContent = useSelector(selectRefillContentFlag);
                        const [sortListOption, setSortListOption] = useState(value);

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                  <svg
                                    aria-hidden="true"
                                    className={`vads-u-margin-left--0p5${
                                      expanded ? ' govt-expanded-arrow' : ''
                                    }`}
                        src/platform/site-wide/header/components/OfficialGovtWebsite/index.js on lines 36..52

                        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 87.

                        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 4 locations. Consider refactoring.
                        Open

                        App.propTypes = {
                          children: PropTypes.node.isRequired,
                          getCoe: PropTypes.func.isRequired,
                          location: PropTypes.object.isRequired,
                          canApply: PropTypes.bool,
                        src/applications/financial-status-report/components/shared/ExplainerComponent.jsx on lines 46..54
                        src/applications/find-forms/components/PdfModal.jsx on lines 66..74
                        src/applications/lgy/coe/form/containers/App.jsx on lines 74..82

                        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 87.

                        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 4 locations. Consider refactoring.
                        Open

                        ExplainerComponent.propTypes = {
                          detailMessage: PropTypes.string.isRequired,
                          headline: PropTypes.string.isRequired,
                          strongMessage: PropTypes.string.isRequired,
                          contentAfterButtons: PropTypes.object,
                        src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/form/containers/App.jsx on lines 76..84
                        src/applications/find-forms/components/PdfModal.jsx on lines 66..74
                        src/applications/lgy/coe/form/containers/App.jsx on lines 74..82

                        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 87.

                        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

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                              columnThree: PropTypes.shape({
                                description: PropTypes.string,
                                img: PropTypes.shape({
                                  src: PropTypes.string,
                                  alt: PropTypes.string,
                        src/platform/site-wide/header/components/MenuItemLevel2/index.js on lines 117..127

                        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 87.

                        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 4 locations. Consider refactoring.
                        Open

                        App.propTypes = {
                          children: PropTypes.node.isRequired,
                          getCoe: PropTypes.func.isRequired,
                          location: PropTypes.object.isRequired,
                          canApply: PropTypes.bool,
                        Severity: Major
                        Found in src/applications/lgy/coe/form/containers/App.jsx and 3 other locations - About 2 hrs to fix
                        src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/form/containers/App.jsx on lines 76..84
                        src/applications/financial-status-report/components/shared/ExplainerComponent.jsx on lines 46..54
                        src/applications/find-forms/components/PdfModal.jsx on lines 66..74

                        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 87.

                        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

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                  <svg
                                    aria-hidden="true"
                                    className={`vads-u-margin-left--0p5${
                                      expanded ? ' govt-expanded-arrow' : ''
                                    }`}
                        src/applications/accredited-representative-portal/components/common/Header/MobileHeader/MobileOfficialGovtWebsite.jsx on lines 36..52

                        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 87.

                        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 4 locations. Consider refactoring.
                        Open

                        PdfModal.propTypes = {
                          isOpen: PropTypes.bool.isRequired,
                          prevFocusedLink: PropTypes.node.isRequired,
                          toggleModalState: PropTypes.func.isRequired,
                          pdfLabel: PropTypes.string,
                        Severity: Major
                        Found in src/applications/find-forms/components/PdfModal.jsx and 3 other locations - About 2 hrs to fix
                        src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/form/containers/App.jsx on lines 76..84
                        src/applications/financial-status-report/components/shared/ExplainerComponent.jsx on lines 46..54
                        src/applications/lgy/coe/form/containers/App.jsx on lines 74..82

                        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 87.

                        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

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                columnThree: PropTypes.shape({
                                  description: PropTypes.string,
                                  img: PropTypes.shape({
                                    src: PropTypes.string,
                                    alt: PropTypes.string,
                        src/platform/site-wide/header/components/MenuItemLevel2/index.js on lines 154..164

                        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 87.

                        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 2 locations. Consider refactoring.
                        Open

                              <p>
                                <strong className="vads-u-margin-right--0p5">
                                  If you haven’t either paid your full balance or requested financial
                                  help,
                                </strong>
                        src/applications/combined-debt-portal/combined/components/MCPAlerts.jsx on lines 23..33

                        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 87.

                        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