opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function update has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  update: function(e) {

    e = e || this.lastEvent;
    if (!e) return;
    this.lastEvent = e;
Severity: Major
Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

    Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
      if ( postFilter && !postFilter[ expando ] ) {
        postFilter = setMatcher( postFilter );
      }
      if ( postFinder && !postFinder[ expando ] ) {
    Severity: Major
    Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

      Function bounce has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      $.effects.effect.bounce = function( o, done ) {
          var el = $( this ),
              props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
      
              // defaults:
      Severity: Major
      Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

        Function voronoi has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          d3.geom.voronoi = function(points) {
            var x = d3_geom_pointX, y = d3_geom_pointY, fx = x, fy = y, clipExtent = d3_geom_voronoiClipExtent;
            if (points) return voronoi(points);
            function voronoi(data) {
              var polygons = new Array(data.length), x0 = clipExtent[0][0], y0 = clipExtent[0][1], x1 = clipExtent[1][0], y1 = clipExtent[1][1];
        Severity: Major
        Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

          Function relayout has 64 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Function d3_interpolateString has 63 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function d3_interpolateString(a, b) {
                var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o;
                a = a + "", b = b + "";
                d3_interpolate_number.lastIndex = 0;
                for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

              Function superMatcher has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  superMatcher = function( seed, context, xml, results, expandContext ) {
                    var elem, j, matcher,
                      setMatched = [],
                      matchedCount = 0,
                      i = "0",
              Severity: Major
              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

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

                        getCurrentRegionTooltip: function () {
                            var options = this.options,
                                header = '',
                                entries = [],
                                fields, formats, formatlen, fclass, text, i,
                Severity: Major
                Found in cabot/static/theme/js/jquery.sparkline.min.js - About 2 hrs to fix

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

                    function d3_layout_packSiblings(node) {
                      if (!(nodes = node.children) || !(n = nodes.length)) return;
                      var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
                      function bound(node) {
                        xMin = Math.min(node.x - node.r, xMin);
                  Severity: Major
                  Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                    Function _showDatepicker has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _showDatepicker: function(input) {
                            input = input.target || input;
                            if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
                                input = $("input", input.parentNode)[0];
                            }
                    Severity: Major
                    Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                      Function nest has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        d3.nest = function() {
                          var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
                          function map(mapType, array, depth) {
                            if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
                            var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;
                      Severity: Major
                      Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

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

                            def _run(self):
                                result = StatusCheckResult(check=self)
                                try:
                                    status = get_job_status(self.name)
                                    active = status['active']
                        Severity: Minor
                        Found in cabot/cabotapp/models.py - 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

                        Function drag has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            drag: function(event, ui) {
                        
                                var ts, bs, ls, rs, l, r, t, b, i, first,
                                    inst = $(this).data("ui-draggable"),
                                    o = inst.options,
                        Severity: Major
                        Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                          Function drag has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              drag: function(event, ui) {
                          
                                  var inst = $(this).data("ui-draggable"), that = this;
                          
                                  $.each(inst.sortables, function() {
                          Severity: Major
                          Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                            Function _fnFeatureHtmlLength has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function _fnFeatureHtmlLength ( oSettings )
                                {
                                  if ( oSettings.oScroll.bInfinite )
                                  {
                                    return null;
                            Severity: Major
                            Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

                              Function _fnDrawHead has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
                                  {
                                    var i, iLen, j, jLen, k, kLen, n, nLocalTr;
                                    var aoLocal = [];
                                    var aApplied = [];
                              Severity: Major
                              Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

                                Function attr has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    elproto.attr = function (name, value) {
                                        if (this.removed) {
                                            return this;
                                        }
                                        if (name == null) {
                                Severity: Major
                                Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

                                  Function Deferred has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    Deferred: function( func ) {
                                      var tuples = [
                                          // action, add listener, listener list, final state
                                          [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                                          [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
                                  Severity: Major
                                  Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

                                    Function explode has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    $.effects.effect.explode = function( o, done ) {
                                    
                                        var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
                                            cells = rows,
                                            el = $( this ),
                                    Severity: Major
                                    Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                                      Function clipLine has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function clipLine(listener) {
                                            var point0, c0, v0, v00, clean;
                                            return {
                                              lineStart: function() {
                                                v00 = v0 = false;
                                      Severity: Major
                                      Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language