department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,821 of 12,821 total issues

Function AuthorizedRoutes has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AuthorizedRoutes = () => {
  const contactListPage = useSelector(
    state =>
      state.featureToggles[
        FEATURE_FLAG_NAMES.mhvSecureMessagingEditContactList
Severity: Major
Found in src/applications/mhv-secure-messaging/containers/AuthorizedRoutes.jsx - About 2 hrs to fix

    Function RemoveAttachmentModal has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const RemoveAttachmentModal = props => {
      return (
        <VaModal
          id={`remove-attachment-modal${
            props.draftSequence ? `-${props.draftSequence}` : ''

      Function AppointmentListSection has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function AppointmentListSection() {
        useManualScrollRestoration();
      
        const featureBreadcrumbUrlUpdate = useSelector(state =>
          selectFeatureBreadcrumbUrlUpdate(state),
      Severity: Major
      Found in src/applications/vaos/appointment-list/index.jsx - About 2 hrs to fix

        Function FacilityCheckboxGroup has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const FacilityCheckboxGroup = props => {
          const {
            facilityName,
            multipleFacilities,
            triageTeams,

          Function LabAndTestDetails has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const LabAndTestDetails = () => {
            const dispatch = useDispatch();
            const labAndTestDetails = useSelector(
              state => state.mr.labsAndTests.labsAndTestsDetails,
            );
          Severity: Major
          Found in src/applications/mhv-medical-records/containers/LabAndTestDetails.jsx - About 2 hrs to fix

            Function conditionReducer has 63 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

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

                const content = () => {
                  if (activeAlert && activeAlert.type === ALERT_TYPE_ERROR) {
                    return (
                      <>
                        <h1 className="vads-u-margin-bottom--0p5">Vaccine:</h1>
              Severity: Major
              Found in src/applications/mhv-medical-records/containers/VaccineDetails.jsx - About 2 hrs to fix

                Function buildNonVAPrescriptionPDFList has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const buildNonVAPrescriptionPDFList = prescription => {
                  return [
                    {
                      sections: [
                        {
                Severity: Major
                Found in src/applications/mhv-medications/util/pdfConfigs.js - About 2 hrs to fix

                  File index.js has 271 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import React from 'react';
                  import { parseISO, startOfDay } from 'date-fns';
                  import { format, utcToZonedTime } from 'date-fns-tz';
                  import { ELIGIBILITY } from './eligibility';
                  import { VISTA_CHECK_IN_STATUS_IENS } from '../appConstants';
                  Severity: Minor
                  Found in src/applications/check-in/utils/appointment/index.js - About 2 hrs to fix

                    File transform.js has 271 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import moment from 'moment';
                    import * as Sentry from '@sentry/browser';
                    import {
                      isStreamlinedShortForm,
                      isStreamlinedLongForm,
                    Severity: Minor
                    Found in src/applications/financial-status-report/utils/transform.js - About 2 hrs to fix

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

                      const addressValidation = {
                        addresses: [
                          {
                            address: {
                              addressLine1: '345 Home Address St',
                      src/applications/_mock-form-ae-design-patterns/mocks/endpoints/address.js on lines 110..130
                      src/applications/representative-appoint/mocks/endpoints/address.js on lines 97..117

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

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

                      const addressValidation = {
                        addresses: [
                          {
                            address: {
                              addressLine1: '345 Home Address St',
                      src/applications/personalization/profile/mocks/endpoints/address.js on lines 97..117
                      src/applications/representative-appoint/mocks/endpoints/address.js on lines 97..117

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

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

                      const addressValidation = {
                        addresses: [
                          {
                            address: {
                              addressLine1: '345 Home Address St',
                      src/applications/_mock-form-ae-design-patterns/mocks/endpoints/address.js on lines 110..130
                      src/applications/personalization/profile/mocks/endpoints/address.js on lines 97..117

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

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

                              transportationReceipts: {
                                title: 'Transportation receipts',
                                reviewTitle: () => (
                                  <div>
                                    <h4 className="vads-u-font-size--h3">Transportation receipts</h4>
                      Severity: Major
                      Found in src/applications/burials-ez/config/form.js and 6 other locations - About 2 hrs to fix
                      src/applications/burials-ez/config/form.js on lines 208..219
                      src/applications/burials-ez/config/form.js on lines 267..278
                      src/applications/burials-ez/config/form.js on lines 305..316
                      src/applications/burials-ez/config/form.js on lines 317..328
                      src/applications/burials-ez/config/form.js on lines 359..372
                      src/applications/burials-ez/config/form.js on lines 381..392

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

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

                              plotAllowancePartOne: {
                                title: 'Plot or interment allowance',
                                reviewTitle: () => (
                                  <div>
                                    <h4 className="vads-u-font-size--h3">
                      Severity: Major
                      Found in src/applications/burials-ez/config/form.js and 6 other locations - About 2 hrs to fix
                      src/applications/burials-ez/config/form.js on lines 208..219
                      src/applications/burials-ez/config/form.js on lines 267..278
                      src/applications/burials-ez/config/form.js on lines 305..316
                      src/applications/burials-ez/config/form.js on lines 317..328
                      src/applications/burials-ez/config/form.js on lines 381..392
                      src/applications/burials-ez/config/form.js on lines 420..431

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

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

                              uploadDD214: {
                                title: 'Veteran’s DD214',
                                reviewTitle: () => (
                                  <div>
                                    <h4 className="vads-u-font-size--h3">Veteran’s DD214</h4>
                      Severity: Major
                      Found in src/applications/burials-ez/config/form.js and 6 other locations - About 2 hrs to fix
                      src/applications/burials-ez/config/form.js on lines 267..278
                      src/applications/burials-ez/config/form.js on lines 305..316
                      src/applications/burials-ez/config/form.js on lines 317..328
                      src/applications/burials-ez/config/form.js on lines 359..372
                      src/applications/burials-ez/config/form.js on lines 381..392
                      src/applications/burials-ez/config/form.js on lines 420..431

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

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

                              burialAllowancePartOne: {
                                title: 'Burial allowance',
                                reviewTitle: () => (
                                  <div>
                                    <h4 className="vads-u-font-size--h3">Burial allowance</h4>
                      Severity: Major
                      Found in src/applications/burials-ez/config/form.js and 6 other locations - About 2 hrs to fix
                      src/applications/burials-ez/config/form.js on lines 208..219
                      src/applications/burials-ez/config/form.js on lines 305..316
                      src/applications/burials-ez/config/form.js on lines 317..328
                      src/applications/burials-ez/config/form.js on lines 359..372
                      src/applications/burials-ez/config/form.js on lines 381..392
                      src/applications/burials-ez/config/form.js on lines 420..431

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

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

                              nationalOrFederalCemetery: {
                                title: 'Cemetery location',
                                reviewTitle: () => (
                                  <div>
                                    <h4 className="vads-u-font-size--h3">Cemetery location</h4>
                      Severity: Major
                      Found in src/applications/burials-ez/config/form.js and 6 other locations - About 2 hrs to fix
                      src/applications/burials-ez/config/form.js on lines 208..219
                      src/applications/burials-ez/config/form.js on lines 267..278
                      src/applications/burials-ez/config/form.js on lines 305..316
                      src/applications/burials-ez/config/form.js on lines 359..372
                      src/applications/burials-ez/config/form.js on lines 381..392
                      src/applications/burials-ez/config/form.js on lines 420..431

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

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

                              transportationExpenses: {
                                title: 'Transportation allowance',
                                reviewTitle: () => (
                                  <div>
                                    <h4 className="vads-u-font-size--h3">Transportation allowance</h4>
                      Severity: Major
                      Found in src/applications/burials-ez/config/form.js and 6 other locations - About 2 hrs to fix
                      src/applications/burials-ez/config/form.js on lines 208..219
                      src/applications/burials-ez/config/form.js on lines 267..278
                      src/applications/burials-ez/config/form.js on lines 305..316
                      src/applications/burials-ez/config/form.js on lines 317..328
                      src/applications/burials-ez/config/form.js on lines 359..372
                      src/applications/burials-ez/config/form.js on lines 420..431

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

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

                              finalRestingPlace: {
                                title: 'Final resting place',
                                reviewTitle: () => (
                                  <div>
                                    <h4 className="vads-u-font-size--h3">Final resting place</h4>
                      Severity: Major
                      Found in src/applications/burials-ez/config/form.js and 6 other locations - About 2 hrs to fix
                      src/applications/burials-ez/config/form.js on lines 208..219
                      src/applications/burials-ez/config/form.js on lines 267..278
                      src/applications/burials-ez/config/form.js on lines 317..328
                      src/applications/burials-ez/config/form.js on lines 359..372
                      src/applications/burials-ez/config/form.js on lines 381..392
                      src/applications/burials-ez/config/form.js on lines 420..431

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

                      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