Showing 4,231 of 14,884 total issues
Function generateResultItemContent
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const generateResultItemContent = async (
item,
doc,
results,
hasHorizontalRule,
- 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 arrayBuilderYesNoUI
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export const arrayBuilderYesNoUI = (
arrayBuilderOptions,
yesNoOptions,
yesNoOptionsMore,
) => {
- 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 getNonArraySchema
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export function getNonArraySchema(schema, uiSchema = {}) {
if (
schema.type === 'array' &&
!get('ui:options.keepInPageOnReview', uiSchema)
) {
- 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 addressUiSchema
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function addressUiSchema(
path = 'address',
checkBoxTitle = 'I live on a United States military base outside of the U.S.',
uiRequiredCallback = () => false,
newSchemaKeys = {},
- 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 Balances
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const Balances = () => {
// get balances from redux
const { debtLetters, mcp } = useSelector(
({ combinedPortal }) => combinedPortal,
);
- 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 V3BasePage
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function V3BasePage() {
/** @param {import('react').FormEvent | import('@department-of-veterans-affairs/web-components/dist/types/components').VaSelectCustomEvent } evt */
function updateValue(evt) {
const { value, name } = /** @type {HTMLInputElement} */ (evt.target);
const display = document.getElementById(`${name}Value`);
- 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 validateLogin
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const validateLogin = async (
lastName,
dob,
dobError,
setLastNameError,
- 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 MessageThreadItem
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const MessageThreadItem = props => {
const dispatch = useDispatch();
const accordionItemRef = useRef();
const { message, isDraftThread, open, forPrint } = props;
const {
- 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 EditContactList
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const EditContactList = () => {
const dispatch = useDispatch();
const location = useLocation();
const history = useHistory();
const [allTriageTeams, setAllTriageTeams] = useState(null);
- 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 MoveMessageToFolderBtn
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const MoveMessageToFolderBtn = props => {
const {
threadId,
allFolders,
isVisible,
- 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 uiSchema
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export function uiSchema(
label = 'Address',
useStreet3 = false,
isRequired = null,
ignoreRequired = false,
- 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 SuggestedAddress
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const SuggestedAddress = ({
formData,
address,
handleAddNewClick,
setAddressToUI,
- 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 ProofOfVeteranStatusNew
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const ProofOfVeteranStatusNew = ({
serviceHistory = [],
vetStatusEligibility = {},
totalDisabilityRating,
userFullName = {
- 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 RadiologyDetails
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const RadiologyDetails = props => {
const { record, fullState, runningUnitTest } = props;
const phase0p5Flag = useSelector(
state => state.featureToggles.mhv_integration_medical_records_to_phase_1,
);
- 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 DownloadReportPage
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const DownloadReportPage = ({ runningUnitTest }) => {
const dispatch = useDispatch();
const {
user: { profile: userProfile },
- 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 webComponents.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
const FORCE_OPTION = { force: true };
const DELAY_OPTION = { force: true, delay: 100 };
Cypress.Commands.add('selectVaButtonPairPrimary', field => {
const selector = `va-button-pair${field ? `[name="${field}"]` : ''}`;
File index.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
const all = {
resourceType: 'Bundle',
id: '27b154d8-18c6-41b3-a988-8474bacd19a8',
meta: {
lastUpdated: '2023-09-29T11:04:31.316-04:00',
File form.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import { externalServices } from 'platform/monitoring/DowntimeNotification';
import get from '@department-of-veterans-affairs/platform-forms-system/get';
import GetFormHelp from '../../shared/components/GetFormHelp';
import manifest from '../manifest.json';
File helpers.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import PropTypes from 'prop-types';
import { VaTextInputField } from 'platform/forms-system/src/js/web-component-fields';
import {
currentOrPastDateUI,
File UpcomingAppointmentsPage.unit.spec.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { mockFetch } from '@department-of-veterans-affairs/platform-testing/helpers';
import { expect } from 'chai';
import MockDate from 'mockdate';
import moment from 'moment';
import React from 'react';