Showing 4,231 of 14,884 total issues
Function SearchControls
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const SearchControls = props => {
const {
currentQuery,
onChange,
geolocateUser,
- 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 VaMedicalCenter
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const VaMedicalCenter = props => {
const {
errorSchema,
formContext,
formData,
- 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 VyeEnrollmentLoginWidget
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function VyeEnrollmentLoginWidget({
toggleLoginModal,
user,
includedInFlipper,
}) {
- 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 adaptWithLangCode
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const adaptWithLangCode = (
langCode,
selector,
attributesToSet = ['hreflang', 'lang'],
setContainerAttribute = 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 createRoutesWithStore
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const createRoutesWithStore = () => {
return (
<Switch>
{routes.map((route, i) => {
const options = { appName: APP_NAMES.CHECK_IN };
- 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 AddressViewField
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const AddressViewField = ({ formData }) => {
// unchanged address variable names
const { city, state, postalCode, country } = formData;
// this should cover all current address use cases
// street, line2, line3, postalCode = platform address schema
- 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 confirmationPageAlertParagraph
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const confirmationPageAlertParagraph = formData => {
if (confirmationPageFormBypassed(formData)) {
if (
hasActiveCompensationITF({ formData }) &&
hasActivePensionITF({ formData })
- 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 TopicSelectPage
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const TopicSelectPage = props => {
const {
onChange,
loggedIn,
goBack,
- 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 EnhancedBenefitsEdit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const EnhancedBenefitsEdit = ({ goToPath }) => {
const benefitType = new URLSearchParams(window.location.search).get('type');
const dispatch = useDispatch();
const data = useSelector(state => state.form.data);
const incomeArray = useMemo(() => data?.income || [], [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 RouteLeavingGuard
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const RouteLeavingGuard = ({
navigate,
when,
shouldBlockNavigation,
title,
- 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 getPageFlow
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export default function getPageFlow(state) {
const featureBreadcrumbUrlUpdate = selectFeatureBreadcrumbUrlUpdate(state);
return {
clinicChoice: {
- 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 RemoveAttachmentModal
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const RemoveAttachmentModal = props => {
return (
<VaModal
id={`remove-attachment-modal${
props.draftSequence ? `-${props.draftSequence}` : ''
- 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 VideoLayoutAtlas
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export default function VideoLayoutAtlas({ data: appointment }) {
const {
atlasConfirmationCode,
clinicName,
clinicPhone,
- 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 VAFacilityPageV2
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export default function VAFacilityPageV2() {
const pageTitle = useSelector(state => getPageTitle(state, pageKey));
const history = useHistory();
const dispatch = useDispatch();
- 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 Issues
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const Issues = ({ issues, isAppeal }) => {
const open = issues.filter(i => i.status === 'open');
const remand = issues.filter(i => i.status === 'remand');
const granted = issues.filter(i => i.status === 'granted');
const denied = issues.filter(i => i.status === 'denied');
- 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 useClinicFormState
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export default function useClinicFormState(pageTitle) {
const initialData = useSelector(getFormData);
const location = useSelector(selectChosenFacilityInfo);
const selectedTypeOfCare = getTypeOfCare(initialData);
- 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 handleInputFocusWithPotentialOverLap
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const handleInputFocusWithPotentialOverLap = (
fieldId1,
fieldId2,
scrollableFieldId,
) => {
- 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 CalculatorSheetResultRow
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export default function CalculatorSheetResultRow({
id,
label,
value,
header,
- 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 validateSearchTermSubmit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const validateSearchTermSubmit = (
searchTerm,
dispatchError,
error,
filters,
- 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 a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { idSchema, formContext, formData, uiSchema, schema } = this.props;
const id = idSchema.$id;
// wrap matching text in a <span> element
- 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"