Showing 3,724 of 12,675 total issues
Avoid too many return
statements within this function. Open
return {
...state,
prescriptionsList: state.prescriptionsList?.map(
rx =>
rx.prescriptionId === action.response.id
Avoid too many return
statements within this function. Open
return Promise.reject(
new Error(
`post-911-gib-status getEnrollmentData() received unexpected error: ${
error.status
}: ${error.title}: ${error.detail}`,
Avoid too many return
statements within this function. Open
return Promise.reject(
new Error(
'post-911-gib-status getEnrollmentData() received unexpected error (no status code available)',
),
);
Avoid too many return
statements within this function. Open
return (
<>
<p data-testid="status">Active: Refill in process</p>
<va-additional-info uswds trigger="What does this status mean?">
{dropdownContent()}
Avoid too many return
statements within this function. Open
return (
<>
<p data-testid="status">Active: Submitted</p>
<va-additional-info
uswds
Avoid too many return
statements within this function. Open
return (
<>
<p data-testid="status">Transferred</p>
<va-additional-info
uswds
Avoid too many return
statements within this function. Open
return {
...state,
selectedSortOption: action.payload,
};
Avoid too many return
statements within this function. Open
return (
<>
<p data-testid="status">Discontinued</p>
<va-additional-info
uswds
Avoid too many return
statements within this function. Open
return {
...state,
prescriptionsList: state.prescriptionsList?.map(
rx =>
rx.prescriptionId === action.err.id
Avoid too many return
statements within this function. Open
return {
...state,
prescriptionsList: state.prescriptionsList?.map(
rx =>
rx.prescriptionId === action.prescriptionId
Avoid too many return
statements within this function. Open
return (
<>
<p data-testid="status">Unknown</p>
<va-additional-info
uswds
Avoid too many return
statements within this function. Open
return {
...state,
apiError: true,
};
Function render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
render() {
if (!this.props.user.login.currentlyLoggedIn) return null;
const { savedStatus } = this.props.form;
const { formConfig } = this.props;
const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
- 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 setStaticHeaderDisplay
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function setStaticHeaderDisplay(
show,
isMinimalHeaderApplicable,
headerState,
isDesktop,
- 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 defaultPostHook
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const defaultPostHook = pathname => {
// On review pages, check the privacy agreement box if it exists and submit.
if (pathname.endsWith('/review-and-submit')) {
return () => {
cy.get(APP_SELECTOR, NO_LOG_OPTION).then($form => {
- 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 determineHeaderState
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function determineHeaderState(show, showMinimalHeader, path, isDesktop) {
if (!show) {
return 'none';
}
if (
- 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 FormSaved
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const FormSaved = props => {
const {
router,
route,
lastSavedDate,
- 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 createDetailItem
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const createDetailItem = async (doc, config, x, item) => {
const paragraphOptions = { lineGap: 6 };
let titleText = item.title ?? '';
const content = [];
const monospaceFont = config.text.monospaceFont || config.text.font;
- 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 SET_IN_PROGRESS_FORM
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
[SET_IN_PROGRESS_FORM]: (state, action) => {
let newState;
// if we’re prefilling, we want to use whatever initial data the form has
if (state.prefillStatus === PREFILL_STATUSES.pending) {
- 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 MHVDowntime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function MHVDowntime({
appTitle = 'our health tools',
children = null,
endTime,
status,
- 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"