Plate-Project/plate

View on GitHub

Showing 345 of 549 total issues

Function performObjectSearch has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
Open

  performObjectSearch : function(object, otherterms) {
    var filenames = this._index.filenames;
    var objects = this._index.objects;
    var objnames = this._index.objnames;
    var titles = this._index.titles;
Severity: Minor
Found in doc/build/html/_static/searchtools.js - About 6 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 DanishStemmer has 169 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        st = new function DanishStemmer() {
          var a_0 = [new Among("hed", -1, 1), new Among("ethed", 0, 1),
              new Among("ered", -1, 1), new Among("e", -1, 1),
              new Among("erede", 3, 1), new Among("ende", 3, 1),
              new Among("erende", 5, 1), new Among("ene", 3, 1),
Severity: Major
Found in plate/static/js/lunr/lunr.da.js - About 6 hrs to fix

    Function r_standard_suffix has 165 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

              function r_standard_suffix() {
                var among_var, v_1;
                sbp.ket = sbp.cursor;
                among_var = sbp.find_among_b(a_4, 43);
                if (among_var) {
    Severity: Major
    Found in plate/static/js/lunr/lunr.fr.js - About 6 hrs to fix

      Function query has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
      Open

        query : function(query) {
          var i;
          var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
      
          // stem the searchterms and add them to the correct list
      Severity: Minor
      Found in doc/build/html/_static/searchtools.js - About 6 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 stemmer has 152 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          lunr.no.stemmer = (function() {
            /* create the wrapped stemmer object */
            var Among = lunr.stemmerSupport.Among,
              SnowballProgram = lunr.stemmerSupport.SnowballProgram,
              st = new function NorwegianStemmer() {
      Severity: Major
      Found in plate/static/js/lunr/lunr.no.js - About 6 hrs to fix

        Function Stemmer has 151 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var Stemmer = function() {
        
          var step2list = {
            ational: 'ate',
            tional: 'tion',
        Severity: Major
        Found in doc/build/html/_static/searchtools.js - About 6 hrs to fix

          Function stemmer has 151 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              lunr.sv.stemmer = (function() {
                /* create the wrapped stemmer object */
                var Among = lunr.stemmerSupport.Among,
                  SnowballProgram = lunr.stemmerSupport.SnowballProgram,
                  st = new function SwedishStemmer() {
          Severity: Major
          Found in plate/static/js/lunr/lunr.sv.js - About 6 hrs to fix

            Function NorwegianStemmer has 143 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    st = new function NorwegianStemmer() {
                      var a_0 = [new Among("a", -1, 1), new Among("e", -1, 1),
                          new Among("ede", 1, 1), new Among("ande", 1, 1),
                          new Among("ende", 1, 1), new Among("ane", 1, 1),
                          new Among("ene", 1, 1), new Among("hetene", 6, 1),
            Severity: Major
            Found in plate/static/js/lunr/lunr.no.js - About 5 hrs to fix

              Function SwedishStemmer has 142 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      st = new function SwedishStemmer() {
                        var a_0 = [new Among("a", -1, 1), new Among("arna", 0, 1),
                            new Among("erna", 0, 1), new Among("heterna", 2, 1),
                            new Among("orna", 0, 1), new Among("ad", -1, 1),
                            new Among("e", -1, 1), new Among("ade", 6, 1),
              Severity: Major
              Found in plate/static/js/lunr/lunr.sv.js - About 5 hrs to fix

                File jquery.tocify.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* jquery Tocify - v1.9.0 - 2013-10-01
                * http://www.gregfranko.com/jquery.tocify.js/
                * Copyright (c) 2013 Greg Franko; Licensed MIT */
                
                // Immediately-Invoked Function Expression (IIFE) [Ben Alman Blog Post](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) that calls another IIFE that contains all of the plugin logic.  I used this pattern so that anyone viewing this code would not have to scroll to the bottom of the page to view the local parameters that were passed to the main IIFE.
                Severity: Minor
                Found in plate/static/js/jquery.tocify.js - About 5 hrs to fix

                  Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jQuery.Callbacks = function( options ) {
                  
                      // Convert options from String-formatted to Object-formatted if needed
                      // (we check in cache first)
                      options = typeof options === "string" ?
                  Severity: Major
                  Found in doc/build/html/_static/jquery-1.11.1.js - About 5 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                                if ( event.pageX == null && original.clientX != null ) {
                                    eventDoc = event.target.ownerDocument || document;
                                    doc = eventDoc.documentElement;
                                    body = eventDoc.body;
                    
                    
                    Severity: Critical
                    Found in doc/build/html/_static/jquery-1.11.1.js - About 5 hrs to fix

                      File lunr.du.js has 374 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*!
                       * Lunr languages, `Dutch` language
                       * https://github.com/MihaiValentin/lunr-languages
                       *
                       * Copyright 2014, Mihai Valentin
                      Severity: Minor
                      Found in plate/static/js/lunr/lunr.du.js - About 5 hrs to fix

                        Function sphinx-rtd-theme has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"sphinx-rtd-theme":[function(require,module,exports){
                        var jQuery = (typeof(window) != 'undefined') ? window.jQuery : require('jquery');
                        
                        // Sphinx theme nav state
                        function ThemeNav () {
                        Severity: Major
                        Found in doc/build/html/_static/js/theme.js - About 4 hrs to fix

                          Function query has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            query : function(query) {
                              var i;
                              var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
                          
                              // stem the searchterms and add them to the correct list
                          Severity: Major
                          Found in doc/build/html/_static/searchtools.js - About 4 hrs to fix

                            Function r_stem_noun_suffixes has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                      function r_stem_noun_suffixes() {
                                        var v_1 = sbp.limit - sbp.cursor,
                                          v_2, v_3;
                                        sbp.ket = sbp.cursor;
                                        if (r_mark_lAr()) {
                            Severity: Major
                            Found in plate/static/js/lunr/lunr.tr.js - About 4 hrs to fix

                              Function ThemeNav has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function ThemeNav () {
                              
                                  var nav = {
                                      navBar: null,
                                      win: null,
                              Severity: Major
                              Found in doc/build/html/_static/js/theme.js - About 4 hrs to fix

                                Function stemWord has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  this.stemWord = function (w) {
                                    var stem;
                                    var suffix;
                                    var firstch;
                                    var origword = w;
                                Severity: Major
                                Found in doc/build/html/_static/searchtools.js - About 4 hrs to fix

                                  Function defaultPrefilter has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function defaultPrefilter( elem, props, opts ) {
                                      /* jshint validthis: true */
                                      var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
                                          anim = this,
                                          orig = {},
                                  Severity: Major
                                  Found in doc/build/html/_static/jquery-1.11.1.js - About 4 hrs to fix

                                    Function r_standard_suffix has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                              function r_standard_suffix() {
                                                var among_var, v_1 = sbp.limit - sbp.cursor,
                                                  v_2, v_3, v_4, v_5, v_6;
                                                sbp.ket = sbp.cursor;
                                                among_var = sbp.find_among_b(a_3, 5);
                                    Severity: Major
                                    Found in plate/static/js/lunr/lunr.du.js - About 4 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language