department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,811 of 12,811 total issues

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

  render() {
    const { showWizard } = this.props;

    if (showWizard === undefined) return null;

    Function TravelReview has 141 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const TravelReview = props => {
      const { router } = props;
      const { t } = useTranslation();
      const selectForm = useMemo(makeSelectForm, []);
      const { data } = useSelector(selectForm);
    Severity: Major
    Found in src/applications/check-in/travel-claim/pages/travel-review/index.jsx - About 5 hrs to fix

      Function NewBookingSection has 141 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function NewBookingSection() {
        const match = useRouteMatch();
        const location = useLocation();
        const dispatch = useDispatch();
        const canUseVaccineFlow = useSelector(selectCanUseVaccineFlow);
      Severity: Major
      Found in src/applications/vaos/covid-19-vaccine/index.jsx - About 5 hrs to fix

        File transactions.js has 401 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import * as Sentry from '@sentry/browser';
        
        import {
          ADDRESS_POU,
          FIELD_NAMES,
        Severity: Minor
        Found in src/platform/user/profile/vap-svc/actions/transactions.js - About 5 hrs to fix

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 597..643
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1481..1527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2239..2285
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2481..2527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2999..3045
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3260..3306
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3863..3909
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4129..4175

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

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 104..150
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1481..1527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2239..2285
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2481..2527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2999..3045
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3260..3306
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3863..3909
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4129..4175

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

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 104..150
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 597..643
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1481..1527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2481..2527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2999..3045
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3260..3306
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3863..3909
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4129..4175

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

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 104..150
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 597..643
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1481..1527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2239..2285
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2481..2527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2999..3045
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3863..3909
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4129..4175

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

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 104..150
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 597..643
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1481..1527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2239..2285
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2481..2527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2999..3045
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3260..3306
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4129..4175

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

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 104..150
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 597..643
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1481..1527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2239..2285
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2999..3045
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3260..3306
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3863..3909
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4129..4175

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

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 104..150
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 597..643
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1481..1527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2239..2285
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2481..2527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2999..3045
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3260..3306
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3863..3909

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

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 104..150
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 597..643
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2239..2285
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2481..2527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2999..3045
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3260..3306
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3863..3909
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4129..4175

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

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

                    {
                      resourceType: 'ServiceRequest',
                      id: 'ServiceRequest-1',
                      meta: {
                        profile: [
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 104..150
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 597..643
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1481..1527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2239..2285
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2481..2527
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3260..3306
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3863..3909
          src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 4129..4175

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

          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

          const mapStateToProps = state => ({
            first: state.form?.data?.fullName?.first,
            middle: state.form?.data?.fullName?.middle,
            last: state.form?.data?.fullName?.last,
            suffix: state.form?.data?.fullName?.suffix,
          src/applications/disability-benefits/2346/components/VeteranInfoBox.jsx on lines 71..79

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

          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

          const mapStateToProps = state => ({
            first: state.form?.data?.fullName?.first,
            middle: state.form?.data?.fullName?.middle,
            last: state.form?.data?.fullName?.last,
            suffix: state.form?.data?.fullName?.suffix,
          src/applications/health-care-supply-reordering/components/VeteranInfoBox.jsx on lines 71..79

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

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

          ReplyDraftItem.propTypes = {
            cannotReply: PropTypes.bool,
            draft: PropTypes.object,
            draftSequence: PropTypes.number,
            drafts: PropTypes.array,
          src/applications/gi/components/SearchBenefits.jsx on lines 328..344
          src/applications/gi/components/profile/BenefitsForm.jsx on lines 324..340

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

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

          BenefitsForm.propTypes = {
            children: PropTypes.node,
            cumulativeService: PropTypes.string,
            eligForPostGiBill: PropTypes.string,
            eligibilityChange: PropTypes.func,
          Severity: Major
          Found in src/applications/gi/components/profile/BenefitsForm.jsx and 2 other locations - About 5 hrs to fix
          src/applications/gi/components/SearchBenefits.jsx on lines 328..344
          src/applications/mhv-secure-messaging/components/ComposeForm/ReplyDraftItem.jsx on lines 562..578

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

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

          SearchBenefits.propTypes = {
            cumulativeService: PropTypes.string,
            dispatchShowModal: PropTypes.func,
            eligForPostGiBill: PropTypes.string,
            enlistmentService: PropTypes.string,
          Severity: Major
          Found in src/applications/gi/components/SearchBenefits.jsx and 2 other locations - About 5 hrs to fix
          src/applications/gi/components/profile/BenefitsForm.jsx on lines 324..340
          src/applications/mhv-secure-messaging/components/ComposeForm/ReplyDraftItem.jsx on lines 562..578

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

          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

                  it('does not render subtitle when pre check in is not complete', () => {
                    const getPreCheckinCompleteStub = () => {
                      return { complete: false };
                    };
                    const useStorageStub = sinon
          src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 297..317

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

          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

                  it('does not render review button when appointment is not upcoming, pre-check-in is complete', () => {
                    const getPreCheckinCompleteStub = () => {
                      return { complete: true };
                    };
                    const useStorageStub = sinon
          src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 362..381

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

          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