Showing 4,177 of 14,709 total issues
Function render
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { onCheckboxChange, onReactStateChange, onSubmitHandler } = this;
const { showMobileForm } = this.props;
const {
city,
Function makeSchemas
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function makeSchemas(prefix) {
const properties = makeFormProperties(prefix);
const schema = {
type: 'object',
properties: {
File newContactMethod.js
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import { createSelector } from 'reselect';
import { Link } from 'react-router';
import TextNotificationsDisclaimer from '../../../../components/TextNotificationsDisclaimer';
Function render
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { loadedStatus, formConfig } = this.props;
let content;
const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
const continueAppButtonText =
Function render
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="schemaform-intro">
<FormTitle title="GI Bill® School Feedback Tool" />
<p>
Function InsuranceSummary
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
const InsuranceSummary = props => {
const {
data,
goBack,
goForward,
Function IntroductionPage
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
const IntroductionPage = props => {
useEffect(() => {
focusElement('h1');
scrollToTop();
}, []);
Function IntroductionPage
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
const IntroductionPage = props => {
useEffect(() => {
focusElement('h1');
scrollToTop();
}, []);
Function InsuranceSummary
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
const InsuranceSummary = props => {
const {
data,
goBack,
goForward,
Function UpcomingAppointmentsList
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
const UpcomingAppointmentsList = props => {
const { router, app, upcomingAppointments } = props;
const { jumpToPage, getCurrentPageFromRouter } = useFormRouting(router);
const { t } = useTranslation();
const page = getCurrentPageFromRouter();
File RequestedAppointmentsList.unit.spec.js
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import MockDate from 'mockdate';
import { expect } from 'chai';
import moment from 'moment';
import { mockFetch } from '@department-of-veterans-affairs/platform-testing/helpers';
Function convertDemographics
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const convertDemographics = info => {
if (!info) return null;
return {
id: info.id,
Function sanitizeKramesHtmlStr
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const sanitizeKramesHtmlStr = htmlString => {
const tempDiv = document.createElement('div');
tempDiv.innerHTML = htmlString;
// This section is to address removing <body> and <page> tags
File SearchForm.jsx
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useMemo, useRef, useState } from 'react';
import FEATURE_FLAG_NAMES from '@department-of-veterans-affairs/platform-utilities/featureFlagNames';
import PropTypes from 'prop-types';
import { useLocation } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
File InstitutionProfile.jsx
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable jsx-a11y/anchor-has-content */
import React from 'react';
import PropTypes from 'prop-types';
import { getScrollOptions } from 'platform/utilities/ui';
import scrollTo from 'platform/utilities/ui/scrollTo';
File communicationPreferences.js
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
import recordEvent from '~/platform/monitoring/record-event';
import { apiRequest } from '~/platform/utilities/api';
import { LOADING_STATES } from '../../common/constants';
import { RX_TRACKING_SUPPORTING_FACILITIES } from '../constants';
Function generate
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
const generate = async data => {
validate(data);
const doc = createAccessibleDoc(data, config);
await registerVaGovFonts(doc);
- 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 FieldTemplate
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
export default function FieldTemplate(props) {
const {
id,
schema,
help,
- 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 ArrayBuilderSummaryPage
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
export default function ArrayBuilderSummaryPage(arrayBuilderOptions) {
const {
arrayPath,
getFirstItemPagePath,
getText,
- 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 uiSchema
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
export function uiSchema(
label = 'Address',
useStreet3 = false,
isRequired = null,
ignoreRequired = 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"