Showing 64 of 270 total issues
Function render
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="app-container">
<AppHeader />
File index.js
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from "react";
import { AppFooter, AppHeader } from "../App";
import "./index.scss";
import Spinner from "react-spinner";
Function render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {data, containerWidth} = this.props;
//Don't render diagram without data
if(data.series.every(datum => {return datum.value.size < 1;})) {
Function checkDay
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
checkDay() {
var mstart;
var mend;
const stories = _.sortBy(this.state.stories, "met_start");
let tempUrl = this.props.location.pathname;
Function ChannelsSelectingInstruction
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ChannelsSelectingInstruction(props) {
var handleClosePopup = props.handleClosePopup;
var showInstruction = props.showInstruction;
return (
<>
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { autoplay } = this.props;
var timelineEnable = this.state.timelineEnable;
var focusOnTranscript = this.state.focusOnActiveTranscript;
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const renderSearchResults = () => {
const { loading, searching, moments } = this.state;
if (loading && searching) {
Function render
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="app-container">
<AppHeader />
Function render
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
url,
time,
autoplay,
Function render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="app-container">
<AppHeader />
Function ChannelPlayerNavigatingInstruction
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ChannelPlayerNavigatingInstruction(props) {
var handleClosePopup = props.handleClosePopup;
var showInstruction = props.showInstruction;
return (
<>
File index.js
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from "react";
import { AppFooter, AppHeader } from "../App";
import { ChannelPlayer } from "../../components/ChannelPlayer";
import { Link, Redirect } from "react-router-dom";
import { ChannelPlayerNavigatingInstruction } from "../../components/ChannelPlayerNavigatingInstruction";
Function componentDidUpdate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
componentDidUpdate() {
const transcripts = this.state.transcripts;
// DOM for timeline
// only need this when transcripts are displayed
if (
- 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
Open
render() {
return (
<div className="app-container">
<AppHeader />
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<footer>
<div className="background" />
<div
Function componentDidMount
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async componentDidMount() {
let path = this.props.location.pathname;
let momentId;
let storyId;
let storyObj;
Function render
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
url,
time,
onEnd,
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<Switch>
<Route exact path="/apollo1" component={Apollo1Explorer} />
<Route exact path="/apollo4" component={Apollo4Explorer} />
Function getTranscriptsTrs
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getTranscriptsTrs(url) {
var rawTranscriber;
var transcripts = [];
await fetch(url)
.then((response) => {
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="Navigating">
<div className="col-sm-6">
<h3>