Showing 39 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
Identical blocks of code found in 2 locations. Consider refactoring. Open
<ProjectCard
homepage={project.homepage}
issueCount={project.open_issues}
lastUpdate={calculateDaysSince(project.updated_at)}
organizationAvatarUrl={project.owner.avatar_url}
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 169.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
<ProjectCard
homepage={project.homepage}
issueCount={project.open_issues}
lastUpdate={calculateDaysSince(project.updated_at)}
organizationAvatarUrl={project.owner.avatar_url}
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 169.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
<Affiliated
affiliatedCount={affiliatedCount}
classes={classes}
expandedOrgs={expandedOrgs}
setExpandedOrgs={(expanded) => {
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 104.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
<Affiliated
affiliatedCount={affiliatedCount}
classes={classes}
expandedOrgs={expandedOrgs}
setExpandedOrgs={(expanded) => {
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 104.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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