Showing 12,841 of 12,841 total issues
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 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 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 App
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const App = ({ children }) => {
const user = useSelector(selectUser);
const userServices = user.profile.services;
const hasMhvAccount = user.profile.mhvAccountState !== 'NONE';
- 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 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 submitForm
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const submitForm = (form, formConfig) => {
const body = formConfig.transformForSubmit(formConfig, form);
const formData = form.data;
const uiSchema = formConfig.chapters.chapter1.pages.page1.uiSchema;
Function EnrollmentVerificationBreadcrumbs
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function EnrollmentVerificationBreadcrumbs() {
const breadcrumbsArray = [
{
href: '/',
label: 'Home',
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
setReferredBenefit,
setWizardStatus,
expander,
Function createRoutesWithStore
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createRoutesWithStore = () => {
return (
<Switch>
{routes.map((route, i) => {
const options = { appName: APP_NAMES.PRE_CHECK_IN };
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 createPageListByChapterAskVa
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function createPageListByChapterAskVa(formConfig, pagesToMoveConfig) {
const pagesByChapter = {};
const modifiedFormConfig = {
chapters: {},
};
Function updateSchema
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateSchema: (formData, formSchema) => {
const updatedCategoryTopicContactPreferences = getContactMethods(
formData.category,
formData.topic,
);
Function getMonthlyIncome
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getMonthlyIncome = formData => {
const {
additionalIncome: {
addlIncRecords = [],
spouse: { spAddlIncome = [] } = {},
Function calculateIncome
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const calculateIncome = (
enhancedFSRActive,
employmentRecords = [],
currEmployment = [],
addlIncRecords = [],
Function OrientationApp
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const OrientationApp = props => {
const [step, setStep] = useState(0);
const [isFirstRender, setIsFirstRender] = useState(true);
const { wizardStateHandler } = props;
Function InnerNavigation
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const InnerNavigation = () => {
const location = useLocation();
const handleActiveLinksStyle = path => {
let isInnerActive = false;
Function confirmAppointment
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function confirmAppointment(history) {
return async (dispatch, getState) => {
const featureBreadcrumbUrlUpdate = selectFeatureBreadcrumbUrlUpdate(
getState(),
);