Showing 3,724 of 12,675 total issues
Function DirectDeposit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const DirectDeposit = () => {
const directDepositHookResult = useDirectDeposit();
const {
ui,
- 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 getAllPayments
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const getAllPayments = () => async dispatch => {
dispatch({ type: PAYMENTS_RECEIVED_STARTED });
const response = await retrievePayments();
if (response.errors) {
const error = response.errors[0];
- 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 mapStateToProps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const mapStateToProps = state => {
const { isReady: hasLoadedScheduledDowntime } = state.scheduledDowntime;
const isLOA3 = isLOA3Selector(state);
const isLOA1 = isLOA1Selector(state);
const isVAPatient = isVAPatientSelector(state);
- 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 MilitaryInformationContent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const MilitaryInformationContent = ({ militaryInformation, veteranStatus }) => {
useEffect(() => {
focusElement('[data-focus-target]');
}, []);
- 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 prescriptions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function prescriptions(state = initialState, action) {
switch (action.type) {
case 'LOADING_ACTIVE':
return set('active.loading', true, state);
- 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 LabAndTestDetails
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const LabAndTestDetails = () => {
const dispatch = useDispatch();
const labAndTestDetails = useSelector(
state => state.mr.labsAndTests.labsAndTestsDetails,
);
- 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 ViewDependentsLayout
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function ViewDependentsLayout(props) {
let mainContent;
if (props.loading) {
mainContent = (
- 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 renderResults
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
renderResults() {
const { searchGovMaintenance } = this.props;
const {
loading,
errors,
- 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 SearchResult
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const SearchResult = ({
representativeName,
addressLine1,
addressLine2,
addressLine3,
- 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 convertAdmissionAndDischargeDetails
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const convertAdmissionAndDischargeDetails = record => {
const summary = getNote(record);
const admissionDate = getAdmissionDate(record, summary);
const dischargeDate = getDischargeDate(record, summary);
- 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 MedicationsListCard
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const MedicationsListCard = ({ rx }) => {
const dispatch = useDispatch();
const showRefillContent = useSelector(selectRefillContentFlag);
const latestTrackingStatus = rx?.trackingList?.[0];
let showRefillRemaining = 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 UserInfoSection
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function UserInfoSection({ enrollmentData = {}, showCurrentAsOfAlert }) {
// Get today’s date to show information current as of
const todayFormatted = formatDateShort(new Date());
const percentageBenefit =
formatPercent(enrollmentData.percentageBenefit) || 'unavailable';
- 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
Avoid too many return
statements within this function. Open
return b.attributes.senderName.localeCompare(a.attributes.senderName);
Avoid too many return
statements within this function. Open
return <Down {...this.props} appType={appType} headerLevel={2} />;
Avoid too many return
statements within this function. Open
return b.attributes.recipientName.localeCompare(
a.attributes.recipientName,
);
Avoid too many return
statements within this function. Open
return a.attributes.recipientName.localeCompare(
b.attributes.recipientName,
);
Avoid too many return
statements within this function. Open
return children;
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return content;
Avoid too many return
statements within this function. Open
return null;