Showing 4,231 of 14,884 total issues
Function ThreadListSort
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const ThreadListSort = props => {
const { sortOrder, sortCallback } = props;
const location = useLocation();
const [sortOrderValue, setSortOrderValue] = useState(sortOrder);
- 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 BlockedTriageGroupAlert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const BlockedTriageGroupAlert = props => {
const {
alertStyle,
parentComponent,
currentRecipient,
- 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 UpcomingAppointmentsDetailsPage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function UpcomingAppointmentsDetailsPage() {
const dispatch = useDispatch();
const { id } = useParams();
const {
appointment,
- 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 CernerTransitioningFacilityAlert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const CernerTransitioningFacilityAlert = ({ t5, t30, facilityId }) => {
const user = useSelector(selectUser);
const transitioningFacilityId = facilityId;
const userFacilities = user.profile.facilities;
const ehrFacilities = useSelector(selectEhrDataByVhaId);
- 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 VideoLayoutVA
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function VideoLayoutVA({ data: appointment }) {
const {
clinicName,
clinicPhysicalLocation,
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 StatusAlert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function StatusAlert({ appointment, facility }) {
const dispatch = useDispatch();
const { search } = useLocation();
const { root, typeOfCare } = useSelector(getNewAppointmentFlow);
- 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 CalendarCell
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const CalendarCell = ({
availableSlots,
currentlySelectedDate,
date,
disabled,
- 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 PhoneLayout
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function PhoneLayout({ data: appointment }) {
const {
clinicName,
clinicPhone,
clinicPhoneExtension,
- 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 ProviderSortVariant
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function ProviderSortVariant({
currentlyShownProvidersList,
notLoading,
}) {
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
Avoid deeply nested control flow statements. Open
if (providerName) data.additionalText = [providerText, signinText];
else data.additionalText = [signinText];
Function ReviewPage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function ReviewPage() {
const pageTitle = useSelector(state => getPageTitle(state, pageKey));
const dispatch = useDispatch();
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
Avoid deeply nested control flow statements. Open
} else if (videoKind === VIDEO_TYPES.gfe) {
data = {
summary: 'VA Video Connect appointment using a VA device',
location: '',
text: 'Join this video meeting using a device provided by VA.',
Function ClaimStatusHeader
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function ClaimStatusHeader({ claim }) {
const { closeDate, status, trackedItems, claimPhaseDates } = claim.attributes;
const getTrackedItemDates = () => {
return trackedItems
? trackedItems.map(item => getTrackedItemDateFromStatus(item))
- 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 deeply nested control flow statements. Open
if (providerName)
data.additionalText.push(`You'll be meeting with ${providerName}`);
Function NameSearchForm
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function NameSearchForm({
autocomplete,
dispatchFetchNameAutocompleteSuggestions,
dispatchFetchSearchByNameResults,
dispatchUpdateAutocompleteName,
- 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 CheckboxGroup
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const CheckboxGroup = ({
errorMessage,
label,
onChange,
onFocus,
- 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 CompareGrid
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function CompareGrid({
className,
showDifferences,
fieldData,
institutions,
- 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 calculateTuition
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function calculateTuition(constant, eligibility, institution, derived) {
if (derived.oldGiBill) {
return { qualifier: 'per year', value: 0, ratedQualifier: '/ year' };
}
if (institution.type === 'ojt') {
- 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 DevicesToConnectSection
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const DevicesToConnectSection = ({
connectedDevices,
connectionAvailable,
hasLoaded,
}) => {
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
uiSchema,
errorSchema,
idSchema,
- 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"