Showing 138 of 138 total issues
Function render
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { fullScreen, user, open, classes } = this.props;
return (
<div>
Function render
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { classes } = this.props;
return (
<PageWrapper label={config.PAGES.writeFeedback.label} handleClose={this.props.handleClose}>
File SelectControlMultipleValue.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
// https://material-ui.com/demos/autocomplete/#react-select
/* eslint-disable react/prop-types, react/jsx-handler-names */
import React from 'react';
Similar blocks of code found in 2 locations. Consider refactoring. Open
const styles = (theme) => ({
notchTop: {
paddingTop: null,
},
iconButton: {
- Read upRead up
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 91.
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
const styles = (theme) => ({
notchTop: {
paddingTop: null,
},
iconButton: {
- Read upRead up
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 91.
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 SelectControlSingleValue.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
// https://material-ui.com/demos/autocomplete/#react-select
/* eslint-disable react/prop-types, react/jsx-handler-names */
import React from 'react';
Function render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { handleClose, classes } = this.props;
const label = config.PAGES.feedbackReports.label;
return (
Function render
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { handleClose, photos } = this.props;
const label = config.PAGES.moderator.label;
return (
Similar blocks of code found in 2 locations. Consider refactoring. Open
function Option(props) {
return (
<MenuItem
buttonRef={props.innerRef}
selected={props.isFocused}
- Read upRead up
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 88.
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
function Option(props) {
return (
<MenuItem
buttonRef={props.innerRef}
selected={props.isFocused}
- Read upRead up
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 88.
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 render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
classes,
children,
label,
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div>
{this.state.fieldValues.map((fieldValue, index) => {
return (
Function firebaseInit
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function firebaseInit(callBackFunctionFCMTokenChange) {
// Initialize Firebase
if (!firebaseApp) {
console.debug(config.FIREBASE.config);
firebaseApp = !firebase.apps.length
Function componentDidMount
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
async componentDidMount() {
mapboxgl.accessToken = config.MAPBOX_TOKEN;
const mapLocation = this.props.mapLocation;
const zoom = mapLocation.zoom;
Function render
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { classes, fullScreen, handleClose, user } = this.props;
const feedback = this.state.feedback;
return (
Similar blocks of code found in 2 locations. Consider refactoring. Open
<RootRef rootRef={domRefInput}>
<input
className="hidden"
type="file"
accept="image/*"
- Read upRead up
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 79.
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
<RootRef rootRef={domRefInput}>
<input
className="hidden"
type="file"
accept="image/*"
- Read upRead up
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 79.
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 render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { classes, fields } = this.props;
const imageVisible = this.state.openGeotag ? "hidden" : "visible";
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { classes } = this.props;
const FirstField = this.props.fields[0];
return (
<div style={{ marginBottom: 300 }}>
Function generateThumbnail
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
.onFinalize(async (object) => {
// File and directory paths.
const filePath = object.name;
const contentType = object.contentType; // This is the image MIME type
const fileDir = path.dirname(filePath);