opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function parseDate has 148 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    parseDate: function (format, value, settings) {
        if (format == null || value == null) {
            throw "Invalid arguments";
        }

Severity: Major
Found in cabot/static/theme/js/jquery-ui.js - About 5 hrs to fix

    Function _fnDraw has 148 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _fnDraw( oSettings )
        {
          /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
          var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
          if ( $.inArray( false, aPreDraw ) !== -1 )
    Severity: Major
    Found in cabot/static/theme/js/jquery.dataTables.min.js - About 5 hrs to fix

      Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      $.fn.position = function( options ) {
          if ( !options || !options.of ) {
              return _position.apply( this, arguments );
          }
      
      
      Severity: Major
      Found in cabot/static/theme/js/jquery-ui.js - About 5 hrs to fix

        Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        $.fn.position = function( options ) {
            if ( !options || !options.of ) {
                return _position.apply( this, arguments );
            }
        
        
        Severity: Major
        Found in cabot/static/theme/js/jquery.ui.position.js - About 5 hrs to fix

          Function treemap has 146 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            d3.layout.treemap = function() {
              var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
              function scale(children, k) {
                var i = -1, n = children.length, child, area;
                while (++i < n) {
          Severity: Major
          Found in cabot/static/arachnys/js/d3.js - About 5 hrs to fix

            Function Color has 146 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Rickshaw.Fixtures.Color = function() {
            
              this.schemes = {};
            
              this.schemes.spectrum14 = [
            Severity: Major
            Found in cabot/static/arachnys/js/rickshaw.js - About 5 hrs to fix

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

                Morris.Donut = (function(_super) {
              
                  __extends(Donut, _super);
              
                  Donut.prototype.defaults = {
              Severity: Major
              Found in cabot/static/arachnys/js/morris.js - About 5 hrs to fix

                Function addArrow has 137 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    addArrow = function (o, value, isEnd) {
                        if (o.type == "path") {
                            var values = Str(value).toLowerCase().split("-"),
                                p = o.paper,
                                se = isEnd ? "end" : "start",
                Severity: Major
                Found in cabot/static/arachnys/js/raphael.js - About 5 hrs to fix

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

                      _create: function() {
                          this.element.closest( "form" )
                              .unbind( "reset" + this.eventNamespace )
                              .bind( "reset" + this.eventNamespace, formResetHandler );
                  
                  
                  Severity: Major
                  Found in cabot/static/theme/js/jquery-ui.js - About 5 hrs to fix

                    Function setData has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Grid.prototype.setData = function(data, redraw) {
                          var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval;
                          if (redraw == null) {
                            redraw = true;
                          }
                    Severity: Major
                    Found in cabot/static/arachnys/js/morris.js - About 5 hrs to fix

                      Function d3_geo_clipExtent has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function d3_geo_clipExtent(x0, y0, x1, y1) {
                          return function(listener) {
                            var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring;
                            var clip = {
                              point: point,
                      Severity: Major
                      Found in cabot/static/arachnys/js/d3.js - About 5 hrs to fix

                        Function _fnGatherData has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function _fnGatherData( oSettings )
                            {
                              var iLoop, i, iLen, j, jLen, jInner,
                                nTds, nTrs, nTd, nTr, aLocalData, iThisIndex,
                                iRow, iRows, iColumn, iColumns, sNodeName,
                        Severity: Major
                        Found in cabot/static/theme/js/jquery.dataTables.min.js - About 5 hrs to fix

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

                                  render: function () {
                                      var target = this.target,
                                          values = this.values,
                                          vlen = values.length,
                                          options = this.options,
                          Severity: Major
                          Found in cabot/static/theme/js/jquery.sparkline.min.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 cabot/static/bootstrap/js/jquery-1.10.2.js - About 5 hrs to fix

                              Function Toggle has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Rickshaw.Graph.Behavior.Series.Toggle = function(args) {
                              
                                this.graph = args.graph;
                                this.legend = args.legend;
                              
                              
                              Severity: Minor
                              Found in cabot/static/arachnys/js/rickshaw.js - About 5 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 bounds has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                d3.geo.bounds = function() {
                                  var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;
                                  var bound = {
                                    point: point,
                                    lineStart: lineStart,
                              Severity: Major
                              Found in cabot/static/arachnys/js/d3.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 cabot/static/bootstrap/js/jquery-1.10.2.js - About 5 hrs to fix

                                  Function _fnSort has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function _fnSort ( oSettings, bApplyClasses )
                                      {
                                        var
                                          i, iLen, j, jLen, k, kLen,
                                          sDataType, nTh,
                                  Severity: Major
                                  Found in cabot/static/theme/js/jquery.dataTables.min.js - About 4 hrs to fix

                                    Function init has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            init: function (el, values, options, width, height) {
                                                var barWidth = parseInt(options.get('barWidth'), 10),
                                                    barSpacing = parseInt(options.get('barSpacing'), 10),
                                                    chartRangeMin = options.get('chartRangeMin'),
                                                    chartRangeMax = options.get('chartRangeMax'),
                                    Severity: Major
                                    Found in cabot/static/theme/js/jquery.sparkline.min.js - About 4 hrs to fix

                                      Function axis has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        d3.svg.axis = function() {
                                          var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;
                                          function axis(g) {
                                            g.each(function() {
                                              var g = d3.select(this);
                                      Severity: Major
                                      Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language