Showing 4,231 of 14,884 total issues
Function useFormRouting
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const useFormRouting = (router = {}) => {
const selectForm = useMemo(makeSelectForm, []);
const { pages, data } = useSelector(selectForm);
const selectApp = useMemo(makeSelectApp, []);
- 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 ConfirmationPage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const ConfirmationPage = ({ form, isLoggedIn, route }) => {
const { useToggleValue, TOGGLE_NAMES } = useFeatureToggle();
const burialsConfirmationPage = useToggleValue(
TOGGLE_NAMES.burialConfirmationPage,
);
- 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 AdditionalInformation
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function AdditionalInformation({ title, id, formData }) {
return (
<>
<h2
id={id}
- 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 DependentCount
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const DependentCount = ({
data,
goBack,
goToPath,
setFormData,
- 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 AddAsset
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const AddAsset = ({ data, goToPath, setFormData }) => {
const { assets } = data;
const { otherAssets = [] } = assets;
// Borrowed from 995 AddIssue
- 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 selectModalityText
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function selectModalityText(appointment, isPendingAppointment = false) {
const isCommunityCare = selectIsCommunityCare(appointment);
const isInPerson = selectIsInPerson(appointment);
const isPhone = selectIsPhone(appointment);
const isVideoAtlas = selectIsAtlasVideo(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 VAFacilityPage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function VAFacilityPage({
address,
canScheduleAtChosenFacility,
facilitiesStatus,
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 selectAppointmentLocality
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function selectAppointmentLocality(
appointment,
isPendingAppointment = false,
) {
const practitioner = selectPractitionerName(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 RecentActivity
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export default function RecentActivity({ claim }) {
const { TOGGLE_NAMES, useToggleValue } = useFeatureToggle();
const cst5103UpdateEnabled = useToggleValue(
TOGGLE_NAMES.cst5103UpdateEnabled,
);
- 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 SearchPage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function SearchPage({
dispatchChangeSearchTab,
search,
preview,
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 CompareDrawer
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function CompareDrawer({
compare,
dispatchRemoveCompareInstitution,
displayed,
alwaysDisplay = 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 careSummariesAndNotesReducer
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export const careSummariesAndNotesReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.CareSummariesAndNotes.GET: {
return {
...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 AllergiesPrintOnly
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const AllergiesPrintOnly = props => {
const { allergies } = props;
const content = () => {
return (
- 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 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { renderChildItems } = this;
const { navItemsLookup } = this.props;
// Derive the parent-most nav item. This is O(n), which isn't great but I'm assuming there won't be 1000s of side nav items.
Function renderVerifiedContent
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderVerifiedContent = () => {
if (shouldVerify()) {
return (
<va-loading-indicator set-focus message="Redirecting to verify..." />
);
Function focusReview
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const focusReview = (name, editing, reviewEditFocusOnHeaders) => {
setTimeout(() => {
const scrollName = `${name}${SCROLL_ELEMENT_SUFFIX}`;
const scrollElement = document.querySelector(`[name="${scrollName}"]`);
Function mapStateToProps
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const mapStateToProps = state => {
const { featureToggles } = state;
const selectedAddress = state.form?.data['view:currentAddress'];
const shippingAddress = state.form?.data[selectedAddress];
const { fullName, vetEmail, order, supplies } = state.form?.data;
Function combineEnrollmentsWithStartMonthDGIB
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const combineEnrollmentsWithStartMonthDGIB = enrollmentPeriods => {
const isArray = Array.isArray(enrollmentPeriods);
const trackDate = [];
const combineMonths = {};
Function EnrollmentVerificationBreadcrumbs
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function EnrollmentVerificationBreadcrumbs() {
const breadcrumbsArray = [
{
href: '/',
label: 'Home',
Function transformForSubmit
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function transformForSubmit(formConfig, form) {
const transformedData = JSON.parse(
formsSystemTransformForSubmit(formConfig, form),
);