Showing 25 of 39 total issues
Function TagGeneratorWizard
has 429 lines of code (exceeds 150 allowed). Consider refactoring. Open
const TagGeneratorWizard = () => {
const theme = useTheme();
const classes = useStyles();
const [changeValue, setChangeValue] = useQueryParam(
'changeValue',
- Create a ticketCreate a ticket
Function Contributors
has 360 lines of code (exceeds 150 allowed). Consider refactoring. Open
export default function Contributors() {
const classes = useStyle();
const location = useLocation();
const [affiliatedCount, setAffiliatedCount] = useState(0);
const [affiliatedOrganizations, setAffiliatedOrganizations] = useState([]);
- Create a ticketCreate a ticket
Function Privacy
has 359 lines of code (exceeds 150 allowed). Consider refactoring. Open
const Privacy = () => {
const classes = useStyles();
const breadCrumbLinks = [
{ href: '/home', name: 'Home' },
{ href: '/privacy', name: 'Privacy' },
- Create a ticketCreate a ticket
File index.js
has 505 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable max-lines-per-function */
/* eslint-disable complexity */
import React, { useState, useEffect, useRef } from 'react';
import Link from '../../components/common/Link';
- Create a ticketCreate a ticket
Function SearchProjects
has 308 lines of code (exceeds 150 allowed). Consider refactoring. Open
const SearchProjects = () => {
const classes = useStyles();
const location = useLocation();
const [affiliations, setAffiliations] = useState({});
const [backupFilterList, setBackupFilterList] = useState([]);
- Create a ticketCreate a ticket
Function AddOrgForm
has a Cognitive Complexity of 49 (exceeds 8 allowed). Consider refactoring. Open
const AddOrgForm = React.forwardRef(({ open, onClose }, ref) => {
const [step, setStep] = useState(0);
const [apiErrors, setApiErrors] = useState({});
const [city, setCity] = useState('');
const [country, setCountry] = useState({ code: '', label: '' });
- Read upRead up
- Create a ticketCreate a ticket
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
File theme-mui.js
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable sort-keys */
import createBreakpoints from '@material-ui/core/styles/createBreakpoints';
import deepmerge from '@material-ui/utils/deepmerge';
import spectrum from './theme-spectrum';
- Create a ticketCreate a ticket
Function SearchProjects
has a Cognitive Complexity of 42 (exceeds 8 allowed). Consider refactoring. Open
const SearchProjects = () => {
const classes = useStyles();
const location = useLocation();
const [affiliations, setAffiliations] = useState({});
const [backupFilterList, setBackupFilterList] = useState([]);
- Read upRead up
- Create a ticketCreate a ticket
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
File index.js
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable max-lines-per-function */
/* eslint-disable complexity */
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useEffect, useState } from 'react';
- Create a ticketCreate a ticket
File index.js
has 408 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import Box from '@material-ui/core/Box';
import Container from '@material-ui/core/Container';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
- Create a ticketCreate a ticket
File TopicTagSection.js
has 389 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useState } from 'react';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
- Create a ticketCreate a ticket
File index.js
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable max-lines-per-function */
import React, { useEffect, useState } from 'react';
import { useLocation } from 'react-router';
import axios from 'axios';
import Box from '@material-ui/core/Box';
- Create a ticketCreate a ticket
Function TagGeneratorWizard
has a Cognitive Complexity of 37 (exceeds 8 allowed). Consider refactoring. Open
const TagGeneratorWizard = () => {
const theme = useTheme();
const classes = useStyles();
const [changeValue, setChangeValue] = useQueryParam(
'changeValue',
- Read upRead up
- Create a ticketCreate a ticket
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
File FilterSelector.js
has 349 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable multiline-comment-style */
import React, { useState } from 'react';
import { ThemeProvider, makeStyles } from '@material-ui/core/styles';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
- Create a ticketCreate a ticket
Function IndvPageContainer
has 201 lines of code (exceeds 150 allowed). Consider refactoring. Open
export const IndvPageContainer = (props) => {
const classes = useStyles();
const projectsPerPage = 4;
const inputSortMethodList = ['best match', 'updated', 'stars'];
- Create a ticketCreate a ticket
File IndvPageContainer.js
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable max-lines-per-function */
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useState, useEffect } from 'react';
import Box from '@material-ui/core/Box'
- Create a ticketCreate a ticket
File ContributorThumbnail.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable max-lines-per-function */
/* eslint-disable complexity */
import React, { useEffect, useState } from 'react';
import Box from '@material-ui/core/Box';
import CardMedia from '@material-ui/core/CardMedia';
- Create a ticketCreate a ticket
Function Thumbnail
has a Cognitive Complexity of 20 (exceeds 8 allowed). Consider refactoring. Open
const Thumbnail = ({
thumbnailInfo,
organization,
isOpen,
dropdownLength,
- Read upRead up
- Create a ticketCreate a ticket
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
File countryList.js
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
const countries = [
{ code: '', label: '', phone: '' },
{ code: 'AD', label: 'Andorra', phone: '376' },
{ code: 'AE', label: 'United Arab Emirates', phone: '971' },
{ code: 'AF', label: 'Afghanistan', phone: '93' },
- Create a ticketCreate a ticket
Function SubscribeSection
has a Cognitive Complexity of 17 (exceeds 8 allowed). Consider refactoring. Open
const SubscribeSection = ({ size }) => {
const classes = useStyles();
const [inputValue, setInputValue] = useState('');
const [message, setMessage] = useState('');
const ariaLabel = { 'aria-label': 'Email Text Field' };
- Read upRead up
- Create a ticketCreate a ticket
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"