opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function animation has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        animation = function () {
            var Now = +new Date,
                l = 0;
            for (; l < animationElements.length; l++) {
                var e = animationElements[l];
Severity: Major
Found in cabot/static/arachnys/js/raphael.js - About 4 hrs to fix

    Function support has 119 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jQuery.support = (function( support ) {
    
      var all, a, input, select, fragment, opt, eventName, isSupported, i,
        div = document.createElement("div");
    
    
    Severity: Major
    Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 4 hrs to fix

      Function ClassList has 115 lines of code (exceeds 25 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: Major
      Found in cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

        Function _fnFeatureHtmlTable has 113 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _fnFeatureHtmlTable ( oSettings )
            {
              /* Check if scrolling is enabled or not - if not then leave the DOM unaltered */
              if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY === "" )
              {
        Severity: Major
        Found in cabot/static/theme/js/jquery.dataTables.min.js - About 4 hrs to fix

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

              function _fnAddOptionsHtml ( oSettings )
              {
                /*
                 * Create a temporary, empty, div which we can later on replace with what we have generated
                 * we do it this way to rendering the 'options' html offline - speed :-)
          Severity: Major
          Found in cabot/static/theme/js/jquery.dataTables.min.js - About 4 hrs to fix

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

              d3.layout.chord = function() {
                var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
                function relayout() {
                  var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
                  chords = [];
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

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

                d3.layout.tree = function() {
                  var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;
                  function tree(d, i) {
                    var nodes = hierarchy.call(this, d, i), root = nodes[0];
                    function firstWalk(node, previousSibling) {
              Severity: Major
              Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

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

                    _create: function() {
                
                        var n, i, handle, axis, hname,
                            that = this,
                            o = this.options;
                Severity: Major
                Found in cabot/static/theme/js/jquery-ui.js - About 4 hrs to fix

                  Function brushstart has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function brushstart() {
                        var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = d3.mouse(target), offset;
                        var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup);
                        if (d3.event.changedTouches) {
                          w.on("touchmove.brush", brushmove).on("touchend.brush", brushend);
                  Severity: Major
                  Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

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

                      _registerMouseEvents: function() {
                    
                        var element = d3.select(this.element);
                    
                        var drag = {
                    Severity: Major
                    Found in cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

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

                      Rickshaw.Fixtures.Time.Local = function() {
                      
                        var self = this;
                      
                        this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
                      Severity: Major
                      Found in cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

                        Function quadtree has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          d3.geom.quadtree = function(points, x1, y1, x2, y2) {
                            var x = d3_geom_pointX, y = d3_geom_pointY, compat;
                            if (compat = arguments.length) {
                              x = d3_geom_quadtreeCompatX;
                              y = d3_geom_quadtreeCompatY;
                        Severity: Major
                        Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

                          Function _fnSortingClasses has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function _fnSortingClasses( oSettings )
                              {
                                var i, iLen, j, jLen, iFound;
                                var aaSort, sClass;
                                var iColumns = oSettings.aoColumns.length;
                          Severity: Major
                          Found in cabot/static/theme/js/jquery.dataTables.min.js - About 4 hrs to fix

                            Function dsv has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              d3.dsv = function(delimiter, mimeType) {
                                var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
                                function dsv(url, row, callback) {
                                  if (arguments.length < 3) callback = row, row = null;
                                  var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);
                            Severity: Major
                            Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

                              Function X has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Rickshaw.Graph.Axis.X = function(args) {
                              
                                var self = this;
                                var berthRate = 0.10;
                              
                              
                              Severity: Minor
                              Found in cabot/static/arachnys/js/rickshaw.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

                              Function _path2curve has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      path2curve = R._path2curve = cacher(function (path, path2) {
                                          var pth = !path2 && paths(path);
                                          if (!path2 && pth.curve) {
                                              return pathClone(pth.curve);
                                          }
                              Severity: Major
                              Found in cabot/static/arachnys/js/raphael.js - About 3 hrs to fix

                                Function _pathToAbsolute has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        pathToAbsolute = R._pathToAbsolute = function (pathArray) {
                                            var pth = paths(pathArray);
                                            if (pth.abs) {
                                                return pathClone(pth.abs);
                                            }
                                Severity: Major
                                Found in cabot/static/arachnys/js/raphael.js - About 3 hrs to fix

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

                                  function defaultPrefilter( elem, props, opts ) {
                                    /* jshint validthis: true */
                                    var prop, value, toggle, tween, hooks, oldfire,
                                      anim = this,
                                      orig = {},
                                  Severity: Major
                                  Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 3 hrs to fix

                                    Function d3_geo_clipCircle has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function d3_geo_clipCircle(radius) {
                                        var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
                                        return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -π, radius - π ]);
                                        function visible(λ, φ) {
                                          return Math.cos(λ) * Math.cos(φ) > cr;
                                    Severity: Major
                                    Found in cabot/static/arachnys/js/d3.js - About 3 hrs to fix

                                      Function Time has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      Rickshaw.Fixtures.Time = function() {
                                      
                                        var self = this;
                                      
                                        this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
                                      Severity: Major
                                      Found in cabot/static/arachnys/js/rickshaw.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language