department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,675 of 12,675 total issues

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

  render() {
    const {
      formIds,
      profile,
      login,
Severity: Major
Found in src/platform/forms/save-in-progress/ApplicationStatus.jsx - About 7 hrs to fix

    Function schoolSearch has 192 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function schoolSearch(state = initialState, action) {
      switch (action.type) {
        case INSTITUTION_SELECTED: {
          const {
            address1,
    Severity: Major
    Found in src/applications/edu-benefits/feedback-tool/reducers/schoolSelect.js - About 7 hrs to fix

      Function SpouseEmploymentWorkDates has 192 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const SpouseEmploymentWorkDates = props => {
        const { goToPath, setFormData, data } = props;
      
        const RETURN_PATH = '/enhanced-spouse-employment-records';
      
      

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

        ITFWrapper.propTypes = {
          children: PropTypes.any.isRequired,
          loggedIn: PropTypes.bool.isRequired,
          pathname: PropTypes.string.isRequired,
          router: PropTypes.shape({
        Severity: Major
        Found in src/applications/appeals/995/containers/ITFWrapper.jsx and 1 other location - About 7 hrs to fix
        src/applications/appeals/testing/sc/containers/ITFWrapper.jsx on lines 170..187

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

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

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

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

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

        Refactorings

        Further Reading

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

          handleChecked = (checked, apneaSupply) => {
            const { order, formData } = this.props;
            let updatedOrder;
            const isSupplyChecked = checked ? 'yes' : 'no';
            recordEvent({
        src/applications/disability-benefits/2346/components/Accessories.jsx on lines 26..50
        src/applications/disability-benefits/2346/components/ApneaSupplies.jsx on lines 26..49
        src/applications/health-care-supply-reordering/components/Accessories.jsx on lines 28..52

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 188.

        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

        ITFWrapper.propTypes = {
          children: PropTypes.any.isRequired,
          loggedIn: PropTypes.bool.isRequired,
          pathname: PropTypes.string.isRequired,
          router: PropTypes.shape({
        src/applications/appeals/995/containers/ITFWrapper.jsx on lines 169..186

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

        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

        export const STATUS_TYPES = {
          amaRemand: 'ama_remand',
          atVso: 'at_vso',
          bvaDecision: 'bva_decision',
          bvaDecisionEffectuation: 'bva_decision_effectuation',
        src/applications/claims-status/utils/appeals-v2-helpers.jsx on lines 113..149

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

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

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

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

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

        Refactorings

        Further Reading

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

          handleChecked = (checked, accessorySupply) => {
            const { order, formData } = this.props;
            let updatedOrder;
            const isSupplyChecked = checked ? 'yes' : 'no';
            recordEvent({
        src/applications/disability-benefits/2346/components/Accessories.jsx on lines 26..50
        src/applications/disability-benefits/2346/components/ApneaSupplies.jsx on lines 26..49
        src/applications/health-care-supply-reordering/components/ApneaSupplies.jsx on lines 28..51

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

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

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

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

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

        Refactorings

        Further Reading

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

          handleChecked = (checked, accessorySupply) => {
            const { order, formData } = this.props;
            let updatedOrder;
            const isSupplyChecked = checked ? 'yes' : 'no';
            recordEvent({
        src/applications/disability-benefits/2346/components/ApneaSupplies.jsx on lines 26..49
        src/applications/health-care-supply-reordering/components/Accessories.jsx on lines 28..52
        src/applications/health-care-supply-reordering/components/ApneaSupplies.jsx on lines 28..51

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

        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

        export const STATUS_TYPES = {
          amaRemand: 'ama_remand',
          atVso: 'at_vso',
          bvaDecision: 'bva_decision',
          bvaDecisionEffectuation: 'bva_decision_effectuation',
        Severity: Major
        Found in src/applications/claims-status/utils/appeals-v2-helpers.jsx and 1 other location - About 7 hrs to fix
        src/applications/personalization/dashboard/utils/appeals-helpers.js on lines 140..176

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

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

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

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

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

        Refactorings

        Further Reading

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

          handleChecked = (checked, apneaSupply) => {
            const { order, formData } = this.props;
            let updatedOrder;
            const isSupplyChecked = checked ? 'yes' : 'no';
            recordEvent({
        src/applications/disability-benefits/2346/components/Accessories.jsx on lines 26..50
        src/applications/health-care-supply-reordering/components/Accessories.jsx on lines 28..52
        src/applications/health-care-supply-reordering/components/ApneaSupplies.jsx on lines 28..51

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

        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

        export function makePages() {
          const gulfWar2001DetailPagesList = Object.keys(GULF_WAR_2001_LOCATIONS)
            .filter(locationId => locationId !== 'none' && locationId !== 'notsure')
            .map(locationId => {
              const pageName = `gulf-war-2001-location-${locationId}`;
        src/applications/disability-benefits/all-claims/pages/toxicExposure/gulfWar1990Details.js on lines 115..138

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

        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

        export function makePages() {
          const gulfWar1990DetailPagesList = Object.keys(GULF_WAR_1990_LOCATIONS)
            .filter(locationId => locationId !== 'none' && locationId !== 'notsure')
            .map(locationId => {
              const pageName = `gulf-war-1990-location-${locationId}`;
        src/applications/disability-benefits/all-claims/pages/toxicExposure/gulfWar2001Details.js on lines 115..139

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

        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

          <va-additional-info
            trigger="Learn more about who qualifies as a Secondary Family Caregiver"
            class="vads-u-margin-y--2p5"
          >
            <div>
        src/applications/caregivers/components/FormDescriptions/PrimaryCaregiverIntro.jsx on lines 14..39

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

        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

            <va-additional-info
              trigger="Learn more about who qualifies as a Primary Family Caregiver"
              class="vads-u-margin-y--2p5"
            >
              <div>
        src/applications/caregivers/components/FormDescriptions/SecondaryCaregiverDescription.jsx on lines 4..29

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

        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

        File constants.js has 485 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { getAppUrl } from '../utilities/registry-helpers';
        
        export const VA_FORM_IDS = Object.freeze({
          FEEDBACK_TOOL: 'FEEDBACK-TOOL',
          FORM_0873: '0873',
        Severity: Minor
        Found in src/platform/forms/constants.js - About 7 hrs to fix

          File SchoolSelectField.jsx has 485 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React from 'react';
          import PropTypes from 'prop-types';
          import _ from 'lodash';
          import classNames from 'classnames';
          import {

            Function Error has 190 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const Error = () => {
              const { t } = useTranslation();
              const selectError = useMemo(makeSelectError, []);
              const { error } = useSelector(selectError);
            
            
            Severity: Major
            Found in src/applications/check-in/day-of/pages/Error.jsx - About 7 hrs to fix

              Function SpousePayrollDeductionInputList has 190 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const SpousePayrollDeductionInputList = props => {
                const { goToPath, goBack, setFormData } = props;
              
                const editIndex = getJobIndex();
              
              

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

                const allFoldersWithUnreadMessages = {
                  data: [
                    {
                      id: '0',
                      type: 'folders',
                src/applications/mhv-landing-page/mocks/api/mhv-api/messaging/folders/index.js on lines 2..51
                src/applications/mhv-medications/mocks/api/mhv-api/messaging/folders/index.js on lines 2..51

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

                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