UTD-CRSS/app.exploreapollo.org

View on GitHub

Showing 64 of 270 total issues

Function render has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    return (
      <div className="app-container">
        <AppHeader />

Severity: Major
Found in src/containers/Apollo1Explorer/index.js - About 2 hrs to fix

    File index.js has 282 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React, { Component } from "react";
    import { AppFooter, AppHeader } from "../App";
    import "./index.scss";
    
    import Spinner from "react-spinner";
    Severity: Minor
    Found in src/containers/DJ/index.js - About 2 hrs to fix

      Function render has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        render() {
          const {data, containerWidth} = this.props;
      
          //Don't render diagram without data
          if(data.series.every(datum => {return datum.value.size < 1;})) {
      Severity: Major
      Found in src/components/BarDiagram/index.js - About 2 hrs to fix

        Function checkDay has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          checkDay() {
            var mstart;
            var mend;
            const stories = _.sortBy(this.state.stories, "met_start");
            let tempUrl = this.props.location.pathname;
        Severity: Major
        Found in src/containers/Apollo11Explorer/index.js - About 2 hrs to fix

          Function ChannelsSelectingInstruction has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function ChannelsSelectingInstruction(props) {
            var handleClosePopup = props.handleClosePopup;
            var showInstruction = props.showInstruction;
            return (
              <>
          Severity: Major
          Found in src/components/ChannelsSelectingInstruction/index.js - About 2 hrs to fix

            Function render has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render() {
                const { autoplay } = this.props;
                var timelineEnable = this.state.timelineEnable;
                var focusOnTranscript = this.state.focusOnActiveTranscript;
            
            
            Severity: Major
            Found in src/components/ChannelPlayer/index.js - About 2 hrs to fix

              Function render has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render() {
                  const renderSearchResults = () => {
                    const { loading, searching, moments } = this.state;
              
                    if (loading && searching) {
              Severity: Major
              Found in src/containers/Search/index.js - About 2 hrs to fix

                Function render has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  render() {
                    return (
                      <div className="app-container">
                        <AppHeader />
                
                
                Severity: Major
                Found in src/containers/Apollo4Explorer/index.js - About 2 hrs to fix

                  Function render has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      const {
                        url,
                        time,
                        autoplay,
                  Severity: Major
                  Found in src/components/AudioPlayer/index.js - About 2 hrs to fix

                    Function render has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      render() {
                        return (
                          <div className="app-container">
                            <AppHeader />
                    
                    
                    Severity: Major
                    Found in src/containers/Apollo6Explorer/index.js - About 2 hrs to fix

                      Function ChannelPlayerNavigatingInstruction has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function ChannelPlayerNavigatingInstruction(props) {
                        var handleClosePopup = props.handleClosePopup;
                        var showInstruction = props.showInstruction;
                        return (
                          <>
                      Severity: Major
                      Found in src/components/ChannelPlayerNavigatingInstruction/index.js - About 2 hrs to fix

                        File index.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                        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";
                        Severity: Minor
                        Found in src/containers/ChannelViewer/index.js - About 2 hrs to fix

                          Function componentDidUpdate has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                            componentDidUpdate() {
                              const transcripts = this.state.transcripts;
                              // DOM for timeline
                              // only need this when transcripts are displayed
                              if (
                          Severity: Minor
                          Found in src/components/ChannelPlayer/index.js - About 2 hrs to fix

                          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() {
                              return (
                                <div className="app-container">
                                  <AppHeader />
                          
                          
                          Severity: Major
                          Found in src/containers/Apollo5Explorer/index.js - About 2 hrs to fix

                            Function render has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              render() {
                                return (
                                  <footer>
                                    <div className="background" />
                                    <div
                            Severity: Minor
                            Found in src/containers/App/index.js - About 2 hrs to fix

                              Function componentDidMount has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                async componentDidMount() {
                                  let path = this.props.location.pathname;
                                  let momentId;
                                  let storyId;
                                  let storyObj;
                              Severity: Minor
                              Found in src/containers/MomentViewer/index.js - About 1 hr to fix

                                Function render has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render() {
                                    const {
                                      url,
                                      time,
                                      onEnd,
                                Severity: Minor
                                Found in src/components/MomentPlayer/index.js - About 1 hr to fix

                                  Function render has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    render() {
                                      return (
                                        <Switch>
                                          <Route exact path="/apollo1" component={Apollo1Explorer} />
                                          <Route exact path="/apollo4" component={Apollo4Explorer} />
                                  Severity: Minor
                                  Found in src/routes.js - About 1 hr to fix

                                    Function getTranscriptsTrs has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    async function getTranscriptsTrs(url) {
                                      var rawTranscriber;
                                      var transcripts = [];
                                      await fetch(url)
                                        .then((response) => {
                                    Severity: Minor
                                    Found in src/containers/ChannelsLoader/getTranscripts.js - About 1 hr to fix

                                      Function render has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        render() {
                                          return (
                                              <div className="Navigating">
                                              <div className="col-sm-6">
                                                <h3>
                                      Severity: Minor
                                      Found in src/components/InstructionsComponent/index.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language