herereadthis/redwall

View on GitHub

Showing 19 of 63 total issues

Function exports has 162 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(grunt) {
    'use strict';

    // Time how long tasks take. Can help when optimizing build times
    require('time-grunt')(grunt);
Severity: Major
Found in archive/Gruntfile.js - About 6 hrs to fix

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

        render() {
            var style1, location;
    
            style1 = {
                color: '#FFF'
    Severity: Major
    Found in app/views/Homepage/components/RetroFooter.js - About 4 hrs to fix

      Function componentWillReceiveProps has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          componentWillReceiveProps(nextProps) {
              var {router} = this.context, routeData;
              routeData = getRouteData(router);
      
      
      
      Severity: Minor
      Found in app/views/Homepage/components/Banner.js - About 3 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

      File DateRender.js has 293 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from 'react';
      
      export default class DateRender extends React.Component {
      
          static propTypes = {
      Severity: Minor
      Found in app/components/DateRender.js - About 3 hrs to fix

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

            render() {
                var addPadding, tca;
        
                addPadding = (pad) => {
                    return {
        Severity: Major
        Found in app/views/Homepage/components/RetroArt.js - About 2 hrs to fix

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

              render() {
                  if (this.props.data === undefined) {
                      return (
                          <div>
                              <p>Loading...</p>
          Severity: Major
          Found in app/views/Homepage/views/NinetiesImage.js - About 2 hrs to fix

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

                render() {
                    return (
                        <article id="riley_fu" ref="rileyFu">
                            <h2 className="bellmaker_container">I swear, I actually know <a
                                href="/code/" title="Here, Read This Code">how to code</a>.
            Severity: Minor
            Found in app/views/Homepage/components/RileyFu.js - About 2 hrs to fix

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

                  render() {
                      var retroRulesStyle, goAway;
              
                      retroRulesStyle = {
                          backgroundColor: '#000',
              Severity: Minor
              Found in app/views/Homepage/components/RetroRules.js - About 1 hr to fix

                Function popupContent has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    popupContent() {
                        var foafLogoUrl = 'http://herereadthis.com/build/images/branding/' +
                            'herereadthis_logo.svg';
                
                        return (
                Severity: Minor
                Found in app/views/Homepage/components/Banner.js - About 1 hr to fix

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

                      render() {
                          if (this.props.ninetiesImgSelection === undefined) {
                              return (
                                  <div><p>Loading....</p></div>
                              );
                  Severity: Minor
                  Found in app/views/Homepage/components/NinetiesImgBox.js - About 1 hr to fix

                    Function componentWillMount has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        componentWillMount() {
                            var MMM, MMMM, www, wwww;
                            // French
                            if (this.props.language === 'fr') {
                                MMM = ['janv', 'févr', 'mars', 'avril', 'mai', 'juin', 'juil',
                    Severity: Minor
                    Found in app/components/DateRender.js - About 1 hr to fix

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

                          componentWillReceiveProps(nextProps) {
                              var {router} = this.context, routeData;
                              routeData = getRouteData(router);
                      
                      
                      
                      Severity: Minor
                      Found in app/views/Homepage/components/Banner.js - About 1 hr to fix

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

                            render() {
                                var metadata;
                                if (this.props.watchData === undefined) {
                                    return (
                                        <p>No data</p>
                        Severity: Minor
                        Found in app/views/Watches/WatchTable.js - About 1 hr to fix

                          Function fetch90sImage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              fetch90sImage(obj) {
                                  let url = 'http://redwall.herereadthis.com/api/banner_image/';
                          
                                  // if the cache is too old, or if 90s image data has not been stored, or
                                  // if the size of the data has not been stored
                          Severity: Minor
                          Found in app/views/Homepage/HomeStore.js - About 1 hr to fix

                            Method render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def render(context)
                                  sorted_collection = collection_to_sort context
                                  return if sorted_collection.empty?
                                  sort_attr = @attributes['sort_by']
                                  case_sensitive = @attributes['case_sensitive'] == 'true'
                            Severity: Minor
                            Found in archive/src/jekyll_code/_plugins/sorted_for.rb - About 1 hr to fix

                              Method render has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def render(context)
                                    sorted_collection = collection_to_sort context
                                    return if sorted_collection.empty?
                                    sort_attr = @attributes['sort_by']
                                    case_sensitive = @attributes['case_sensitive'] == 'true'
                              Severity: Minor
                              Found in archive/src/jekyll_code/_plugins/sorted_for.rb - About 55 mins 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

                              Method parse has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def parse(tokens)
                                    @nodelist ||= []
                                    @nodelist.clear
                                    
                                    while token = tokens.shift
                              Severity: Minor
                              Found in archive/src/jekyll_code/_plugins/raw_tag.rb - About 55 mins 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 parseString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                      parseString: (str) => {
                                          let numRegex = /^(\d+\.?\d*|\d+,?\d*|\.\d+|,\d+)$/,
                                              finalVal = str;
                              
                                          if (str === 'false') {
                              Severity: Minor
                              Found in app/AppConstants.js - About 25 mins 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 setCacheAge has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  setCacheAge(currentTime) {
                                      var cacheData, dateDiff;
                              
                                      cacheData = this.getLocalCacheData();
                              
                              
                              Severity: Minor
                              Found in app/AppStore.js - About 25 mins 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

                              Severity
                              Category
                              Status
                              Source
                              Language