opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  ajax: function( url, options ) {

    // If url is an object, simulate pre-1.5 signature
    if ( typeof url === "object" ) {
      options = url;
Severity: Major
Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 day to fix

    Function Graph has 220 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Rickshaw.Graph = function(args) {
    
      var self = this;
    
      this.initialize = function(args) {
    Severity: Major
    Found in cabot/static/arachnys/js/rickshaw.js - About 1 day to fix

      Function ClassList has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
      Open

      Rickshaw.Compat.ClassList = function() {
      
        /* adapted from http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
      
        if (typeof document !== "undefined" && !("classList" in document.createElement("a"))) {
      Severity: Minor
      Found in cabot/static/arachnys/js/rickshaw.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

      Function d3_locale_timeFormat has 213 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function d3_locale_timeFormat(locale) {
          var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;
          function d3_time_format(template) {
            var n = template.length;
            function format(date) {
      Severity: Major
      Found in cabot/static/arachnys/js/d3.js - About 1 day to fix

        Function setFillAndStroke has 211 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            setFillAndStroke = function (o, params) {
                // o.paper.canvas.style.display = "none";
                o.attrs = o.attrs || {};
                var node = o.node,
                    a = o.attrs,
        Severity: Major
        Found in cabot/static/arachnys/js/raphael.js - About 1 day to fix

          Function force has 207 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            d3.layout.force = function() {
              var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges;
              function repulse(node) {
                return function(quad, x1, _, x2) {
                  if (quad.point !== node) {
          Severity: Major
          Found in cabot/static/arachnys/js/d3.js - About 1 day to fix

            Function Bar has 206 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              Morris.Bar = (function(_super) {
            
                __extends(Bar, _super);
            
                function Bar(options) {
            Severity: Major
            Found in cabot/static/arachnys/js/morris.js - About 1 day to fix

              Function setDocument has 200 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              setDocument = Sizzle.setDocument = function( node ) {
                var doc = node ? node.ownerDocument || node : preferredDoc,
                  parent = doc.defaultView;
              
                // If no document and documentElement is available, return
              Severity: Major
              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 day to fix

                Function _create has 197 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _create: function() {
                        // Some browsers only repeat keydown events, not keypress events,
                        // so we use the suppressKeyPress flag to determine if we've already
                        // handled the keydown event. #7269
                        // Unfortunately the code for & in keypress is the same as the up arrow,
                Severity: Major
                Found in cabot/static/theme/js/jquery.ui.autocomplete.js - About 7 hrs to fix

                  Function _create has 197 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _create: function() {
                          // Some browsers only repeat keydown events, not keypress events,
                          // so we use the suppressKeyPress flag to determine if we've already
                          // handled the keydown event. #7269
                          // Unfortunately the code for & in keypress is the same as the up arrow,
                  Severity: Major
                  Found in cabot/static/theme/js/jquery-ui.js - About 7 hrs to fix

                    Function runAnimation has 194 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function runAnimation(anim, element, percent, status, totalOrigin, times) {
                            percent = toFloat(percent);
                            var params,
                                isInAnim,
                                isInAnimSet,
                    Severity: Major
                    Found in cabot/static/arachnys/js/raphael.js - About 7 hrs to fix

                      Function Graph has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Rickshaw.Graph = function(args) {
                      
                        var self = this;
                      
                        this.initialize = function(args) {
                      Severity: Minor
                      Found in cabot/static/arachnys/js/rickshaw.js - About 7 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 jquery.ui.autocomplete.js has 471 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*!
                       * jQuery UI Autocomplete 1.10.3
                       * http://jqueryui.com
                       *
                       * Copyright 2013 jQuery Foundation and other contributors
                      Severity: Minor
                      Found in cabot/static/theme/js/jquery.ui.autocomplete.js - About 7 hrs to fix

                        Function _fnScrollDraw has 182 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function _fnScrollDraw ( o )
                            {
                              var
                                nScrollHeadInner = o.nScrollHead.getElementsByTagName('div')[0],
                                nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0],
                        Severity: Major
                        Found in cabot/static/theme/js/jquery.dataTables.min.js - About 7 hrs to fix

                          Function _run has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def _run(self):
                                  if not hasattr(self, 'utcnow'):
                                      self.utcnow = None
                                  result = StatusCheckResult(check=self)
                          
                          
                          Severity: Minor
                          Found in cabot/cabotapp/models.py - About 7 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 _fnCalculateColumnWidths has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function _fnCalculateColumnWidths ( oSettings )
                              {
                                var iTableWidth = oSettings.nTable.offsetWidth;
                                var iUserInputs = 0;
                                var iTmpWidth;
                          Severity: Major
                          Found in cabot/static/theme/js/jquery.dataTables.min.js - About 6 hrs to fix

                            Function _generateHTML has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _generateHTML: function(inst) {
                                    var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
                                        controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
                                        monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
                                        selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
                            Severity: Major
                            Found in cabot/static/theme/js/jquery-ui.js - About 6 hrs to fix

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

                                      render: function () {
                                          var options = this.options,
                                              target = this.target,
                                              canvasWidth = this.canvasWidth,
                                              canvasHeight = this.canvasHeight,
                              Severity: Major
                              Found in cabot/static/theme/js/jquery.sparkline.min.js - About 6 hrs to fix

                                Function size has 156 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                $.effects.effect.size = function( o, done ) {
                                
                                    // Create element
                                    var original, baseline, factor,
                                        el = $( this ),
                                Severity: Major
                                Found in cabot/static/theme/js/jquery-ui.js - About 6 hrs to fix

                                  File jquery.ui.position.js has 419 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /*!
                                   * jQuery UI Position 1.10.3
                                   * http://jqueryui.com
                                   *
                                   * Copyright 2013 jQuery Foundation and other contributors
                                  Severity: Minor
                                  Found in cabot/static/theme/js/jquery.ui.position.js - About 6 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language