Showing 4,177 of 14,709 total issues
Function uiSchema
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function uiSchema(
label = 'Address',
useStreet3 = false,
isRequired = null,
ignoreRequired = false,
Function EvidenceVaRecords
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
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
File FileField.jsx
has 475 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// This Component is a close duplicate of the FileField provided by Platform.
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
File FileField.jsx
has 475 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// This Component is a close duplicate of the FileField provided by Platform.
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
Function PrescriptionDetailsDocumentation
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PrescriptionDetailsDocumentation = () => {
const { prescriptionId } = useParams();
const contentRef = useRef();
const {
prescription,
File self_entered_info.js
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Blue Button PDF template.
*
* NB: The order in which items are added to the document is important,
* and thus PDFKit requires performing operations synchronously.
Function buildVAPrescriptionPDFList
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildVAPrescriptionPDFList = prescription => {
const refillHistory = [...(prescription?.rxRfRecords || [])];
const originalFill = createOriginalFillRecord(prescription);
refillHistory.push(originalFill);
File index.unit.spec.js
has 473 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment-timezone';
import { expect } from 'chai';
import {
addUniqueEventsToList,
deriveDefaultSelectedOption,
File address-schema.js
has 473 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* The intent for this module is to provide a flexible, reusable address schema and widget that can be used in any form throughout VA.gov.
* The address uiSchema should be flexible enough to handle these cases:
* 1. Top level address property (schema.properties.address)
* 2. Nested address property (schema.properties.someProperty.properties.address)
Function render
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div
className="schemaform-intro"
itemScope
Function uiSchema
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function uiSchema() {
const topicChangeSelector = createSelector(
({ formData }) => get(['topic'].concat('levelOne'), formData),
({ formData }) => get(['topic'].concat('levelTwo'), formData),
({ topicSchema }) => topicSchema,
File EducationWizard.jsx
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// disabled for unit testing to work
/* eslint-disable no-restricted-syntax */
/* eslint-disable guard-for-in */
import React from 'react';
File form.js
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import { externalServices } from 'platform/monitoring/DowntimeNotification';
import get from 'platform/utilities/data/get';
import manifest from '../manifest.json';
File address-schema.js
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* The intent for this module is to provide a flexible, reusable address schema and widget that can be used in any form throughout VA.gov.
* The address uiSchema should be flexible enough to handle these cases:
* 1. Top level address property (schema.properties.address)
* 2. Nested address property (schema.properties.someProperty.properties.address)
Function ConfirmationPage
has 182 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ConfirmationPage = props => {
useLayoutEffect(() => {
focusElement('h2', null, 'va-alert');
scrollToTop('topScrollElement');
}, []);
Function render
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { route, userIdVerified, userLoggedIn } = this.props;
const { formConfig, pageList } = route;
return (
File healthInsuranceInformation.js
has 467 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import {
titleUI,
titleSchema,
textUI,
Function renderYourMilitaryDetails
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderYourMilitaryDetails = () => {
const chapter33Check = giBillChapter === '33a' || giBillChapter === '33b';
/*
***toggleCumulativeDropDown***
Hide Cumulative Post 9/11 active-duty service drop down if applicant selects 'Fry Scholarship'
File Dashboard.jsx
has 466 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { connect, useDispatch, useSelector } from 'react-redux';
import isEmpty from 'lodash/isEmpty';
Function ConfirmationPageV2
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ConfirmationPageV2 = () => {
resetStoredSubTask();
const alertRef = useRef(null);