Showing 4,177 of 14,709 total issues
Function CheckInConfirmation
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CheckInConfirmation = props => {
const { selectedAppointment, triggerRefresh, router } = props;
const selectFeatureToggles = useMemo(makeSelectFeatureToggles, []);
const featureToggles = useSelector(selectFeatureToggles);
const {
Function RadiologySingleImage
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
const RadiologySingleImage = () => {
const dispatch = useDispatch();
const { labId, imageId } = useParams();
// const labAndTestDetails = useSelector(
// state => state.mr.labsAndTests.labsAndTestsDetails,
Function VerifyEnrollmentsPage
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
export const VerifyEnrollmentsPage = ({
editMonthVerification,
enrollmentVerification,
enrollmentVerificationFetchFailure,
enrollmentVerificationSubmitted,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function useGetCheckInData
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
const useGetCheckInData = ({
refreshNeeded,
appointmentsOnly = false,
reload = false,
router,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function SearchApp
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
const SearchApp = ({
fetchSearchResults,
router,
search,
searchGovMaintenance,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File components.jsx
has 427 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useRef } from 'react';
import classNames from 'classnames';
import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
import {
VaAlert,
Function IntroductionPage
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
const IntroductionPage = props => {
useEffect(() => {
focusElement('h1');
scrollTo('topContentElement');
Function render
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { submission, data } = this.props.form;
const { response } = submission;
const veteranFirstName = data?.veteranInformation?.fullName?.first || '';
const veteranLastName = data?.veteranInformation?.fullName?.last || '';
File ReviewCollapsibleChapter.jsx
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { Element } from 'platform/utilities/scroll';
File constants.js
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
export const recordType = {
ALLERGIES: 'allergies',
VACCINES: 'vaccines',
CARE_SUMMARIES_AND_NOTES: 'care summaries and notes',
LABS_AND_TESTS: 'lab and test results',
File utils.js
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Template utils.
*/
import { unset } from 'lodash';
import registerFonts from '../registerFonts';
Function render
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
uiSchema,
errorSchema,
idSchema,
Function ThreadListItem
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ThreadListItem = props => {
const location = useLocation();
const { keyword, activeFolder } = props;
const {
senderName,
Function getNewAppointmentFlow
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function getNewAppointmentFlow(state) {
const featureBreadcrumbUrlUpdate = selectFeatureBreadcrumbUrlUpdate(state);
const flowType = getFlowType(state);
const isSingleVaFacility = selectSingleSupportedVALocation(state);
Function SearchResultsHeader
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
export const SearchResultsHeader = ({
results,
facilityType,
serviceType,
context,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function EvidenceVaRecords
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
const EvidenceVaRecords = ({
data,
goBack,
goForward,
goToPath,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function InstallmentContract
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
const InstallmentContract = props => {
const { data, goToPath, setFormData } = props;
const { installmentContracts = [] } = data;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function DeleteDraft
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
const DeleteDraft = props => {
const history = useHistory();
const location = useLocation();
const dispatch = useDispatch();
const deleteDraftButtonRef = useRef();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { supplies, order, eligibility } = this.props;
const currentDate = moment();
const batterySupplies = supplies.filter(
batterySupply => batterySupply.productGroup === BATTERY,
Function UneditableData
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
const UneditableData = () => {
const name = `${USER.FIRST_NAME} ${USER.MIDDLE_NAME} ${USER.LAST_NAME}`;
const parsedDob = parse(USER.BIRTH_DATE, 'yyyyMMdd', new Date());
const dob = format(parsedDob, 'MMMM d, yyyy');
const gender = genderLabels[USER.GENDER];