department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,796 of 12,796 total issues

Function mapStateToProps has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const mapStateToProps = state => {
  const mailingFieldName = VAP_SERVICE.FIELD_NAMES.MAILING_ADDRESS;

  const {
    apiRoute,

    Function EditConfirmCancelModal has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const EditConfirmCancelModal = props => {
      const { activeSection, onHide, isVisible } = props;
    
      const { onCancel } = useContext(EditContext);
    
    

      Function ContactInfoNeeded has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const ContactInfoNeeded = () => {
        const email = useSelector(state =>
          selectVAPContactInfoField(state, FIELD_NAMES.EMAIL),
        );
        const mailingAddress = useSelector(state =>

        Function HealthcareError has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const HealthcareError = () => {
            // status will be 'warning' if toggle is on
            const status = useToggleValue(TOGGLE_NAMES.myVaUpdateErrorsWarnings)
              ? 'warning'
              : 'error';

          Function idcard has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function idcard(state = initialState, action) {
            switch (action.type) {
              case ATTRS_FETCHING:
                return {
                  ...state,
          Severity: Minor
          Found in src/applications/veteran-id-card/reducers/idcard.js - About 1 hr to fix

            Function getRecordType has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const getRecordType = record => {
              if (record.resourceType === fhirResourceTypes.DIAGNOSTIC_REPORT) {
                if (record.code?.text === 'CH') return labTypes.CHEM_HEM;
                if (
                  record.code?.coding?.some(
            Severity: Minor
            Found in src/applications/mhv-medical-records/reducers/labsAndTests.js - About 1 hr to fix

              Function failedMsg has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const failedMsg = () => {
                  return (
                    <va-alert
                      status="warning"
                      visible

                Function sharingReducer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const sharingReducer = (state = initialState, action) => {
                  switch (action.type) {
                    case Actions.Sharing.STATUS: {
                      const { consentStatus } = action.response;
                      return {
                Severity: Minor
                Found in src/applications/mhv-medical-records/reducers/sharing.js - About 1 hr to fix

                  Function generateTxt has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      async () => {
                        setDownloadStarted(true);
                        setDownloadType('txt');
                        setBlueButtonRequested(true);
                        dispatch(clearAlerts());

                    Function buildNonVAPrescriptionTXT has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const buildNonVAPrescriptionTXT = prescription => {
                      return `
                    ---------------------------------------------------------------------------------
                    
                    
                    
                    Severity: Minor
                    Found in src/applications/mhv-medications/util/txtConfigs.js - About 1 hr to fix

                      Function benefitEndDateExplanation has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function benefitEndDateExplanation(condition, delimitingDate) {
                        switch (condition) {
                          case 'activeDuty':
                            return (
                              <div className="section benefit-end-date">
                      Severity: Minor
                      Found in src/applications/post-911-gib-status/utils/helpers.jsx - About 1 hr to fix

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 86..103
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1463..1480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2221..2238
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2463..2480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2981..2998
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3242..3259
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3845..3862
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4111..4128

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

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 86..103
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 579..596
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1463..1480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2221..2238
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2981..2998
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3242..3259
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3845..3862
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4111..4128

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

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 579..596
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1463..1480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2221..2238
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2463..2480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2981..2998
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3242..3259
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3845..3862
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4111..4128

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

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 86..103
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 579..596
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1463..1480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2221..2238
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2463..2480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2981..2998
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3242..3259
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4111..4128

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

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 86..103
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 579..596
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1463..1480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2463..2480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2981..2998
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3242..3259
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3845..3862
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4111..4128

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

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 86..103
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 579..596
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1463..1480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2221..2238
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2463..2480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2981..2998
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3242..3259
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3845..3862

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

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 86..103
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 579..596
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1463..1480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2221..2238
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2463..2480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2981..2998
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3845..3862
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4111..4128

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

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 86..103
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 579..596
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2221..2238
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2463..2480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2981..2998
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3242..3259
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3845..3862
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4111..4128

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

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

                                  {
                                    resourceType: 'Organization',
                                    id: 'OrgPerformer-989',
                                    meta: {
                                      profile: [
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 86..103
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 579..596
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1463..1480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2221..2238
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2463..2480
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3242..3259
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3845..3862
                        src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4111..4128

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

                        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