abkfenris/gage-web

View on GitHub

Showing 47 of 134 total issues

File bootstrap.js has 1256 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Bootstrap v3.1.1 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
Severity: Major
Found in app/static/js/bootstrap.js - About 3 days to fix

    File websupport.js has 638 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * websupport.js
     * ~~~~~~~~~~~~~
     *
     * sphinx.websupport utilties for all documentation.
    Severity: Major
    Found in doc/dead/html/_static/websupport.js - About 1 day to fix

      Function Stemmer has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
      Open

      var Stemmer = function() {
      
        var step2list = {
          ational: 'ate',
          tional: 'tion',
      Severity: Minor
      Found in doc/dead/html/_static/searchtools.js - About 1 day 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 searchtools.js has 458 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * searchtools.js_t
       * ~~~~~~~~~~~~~~~~
       *
       * Sphinx JavaScript utilties for the full-text search.
      Severity: Minor
      Found in doc/dead/html/_static/searchtools.js - About 7 hrs to fix

        Function performObjectSearch has a Cognitive Complexity of 44 (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/dead/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 query has a Cognitive Complexity of 40 (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/dead/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 151 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Function query has 115 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/dead/html/_static/searchtools.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/dead/html/_static/searchtools.js - About 4 hrs to fix

              Function performTermsSearch has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                performTermsSearch : function(searchterms, excluded, terms, score) {
                  var filenames = this._index.filenames;
                  var titles = this._index.titles;
              
                  var i, j, file, files;
              Severity: Minor
              Found in doc/dead/html/_static/searchtools.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

              File coverage_html.js has 276 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // Coverage.py HTML report browser code.
              /*jslint browser: true, sloppy: true, vars: true, plusplus: true, maxerr: 50, indent: 4 */
              /*global coverage: true, document, window, $ */
              
              coverage = {};
              Severity: Minor
              Found in tmp/coverage/coverage_html.js - About 2 hrs to fix

                Function SphinxRtdTheme has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                window.SphinxRtdTheme = (function (jquery) {
                    var stickyNav = (function () {
                        var navBar,
                            win,
                            winScroll = false,
                Severity: Major
                Found in doc/_build/html/_static/js/theme.js - About 2 hrs to fix

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

                      var stickyNav = (function () {
                          var navBar,
                              win,
                              winScroll = false,
                              linkScroll = false,
                  Severity: Major
                  Found in doc/_build/html/_static/js/theme.js - About 2 hrs to fix

                    Function displayNextItem has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function displayNextItem() {
                          // results left, load the summary and display it
                          if (results.length) {
                            var item = results.pop();
                            var listItem = $('<li style="display:none"></li>');
                    Severity: Major
                    Found in doc/dead/html/_static/searchtools.js - About 2 hrs to fix

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

                        Tooltip.prototype.show = function () {
                          var e = $.Event('show.bs.' + this.type)
                      
                          if (this.hasContent() && this.enabled) {
                            this.$element.trigger(e)
                      Severity: Minor
                      Found in app/static/js/bootstrap.js - About 2 hrs to fix

                        Function performObjectSearch has 50 lines of code (exceeds 25 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/dead/html/_static/searchtools.js - About 2 hrs to fix

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

                            function initEvents() {
                              $('a.comment-close').live("click", function(event) {
                                event.preventDefault();
                                hide($(this).attr('id').substring(2));
                              });
                          Severity: Minor
                          Found in doc/dead/html/_static/websupport.js - About 1 hr to fix

                            Function slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              Carousel.prototype.slide = function (type, next) {
                                var $active   = this.$element.find('.item.active')
                                var $next     = next || $active[type]()
                                var isCycling = this.interval
                                var direction = type == 'next' ? 'left' : 'right'
                            Severity: Minor
                            Found in app/static/js/bootstrap.js - About 1 hr to fix

                              Function addComment has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function addComment(form) {
                                  var node_id = form.find('input[name="node"]').val();
                                  var parent_id = form.find('input[name="parent"]').val();
                                  var text = form.find('textarea[name="comment"]').val();
                                  var proposal = form.find('textarea[name="proposal"]').val();
                              Severity: Minor
                              Found in doc/dead/html/_static/websupport.js - About 1 hr to fix

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

                                    function keyHandler( handleObj ) {
                                        // Only care when a possible input has been specified
                                        if ( typeof handleObj.data !== "string" ) {
                                            return;
                                        }
                                Severity: Minor
                                Found in tmp/coverage/jquery.hotkeys.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language