opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function interPathHelper has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function interPathHelper(path1, path2, justCount) {
        path1 = R._path2curve(path1);
        path2 = R._path2curve(path2);
        var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2,
            res = justCount ? 0 : [];
Severity: Major
Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

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

      d3.behavior.drag = function() {
        var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, "mousemove", "mouseup"), touchstart = dragstart(touchid, touchposition, "touchmove", "touchend");
        function drag() {
          this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart);
        }
    Severity: Major
    Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

      Function bind has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function bind(group, groupData) {
            var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;
            if (key) {
              var nodeByKeyValue = new d3_Map(), dataByKeyValue = new d3_Map(), keyValues = [], keyValue;
              for (i = -1; ++i < n; ) {
      Severity: Major
      Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

        Function remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          remove: function( elem, types, handler, selector, mappedTypes ) {
            var j, handleObj, tmp,
              origCount, t, events,
              special, handlers, type,
              namespaces, origType,
        Severity: Major
        Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

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

          $.effects.animateClass = function( value, duration, easing, callback ) {
              var o = $.speed( duration, easing, callback );
          
              return this.queue( function() {
                  var animated = $( this ),
          Severity: Minor
          Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

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

                    var fnInnerSorting = function () {
                      var iColumn, iNextSort;
            
                      /* If the shift key is pressed then we are multiple column sorting */
                      if ( e.shiftKey )
            Severity: Minor
            Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                          if (params[has](att)) {
                              if (!R._availableAttrs[has](att)) {
                                  continue;
                              }
                              var value = params[att];
              Severity: Critical
              Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

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

                    function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {
                        var cx = 3 * p1x,
                            bx = 3 * (p2x - p1x) - cx,
                            ax = 1 - cx - bx,
                            cy = 3 * p1y,
                Severity: Minor
                Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

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

                      eve.off = eve.unbind = function (name, f) {
                          var names = name.split(separator),
                              e,
                              key,
                              splice,
                  Severity: Minor
                  Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

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

                      function d3_interpolateTransform(a, b) {
                        var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
                        if (ta[0] != tb[0] || ta[1] != tb[1]) {
                          s.push("translate(", null, ",", null, ")");
                          q.push({
                    Severity: Minor
                    Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

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

                        Morris.Hover = (function() {
                      
                          Hover.defaults = {
                            "class": 'morris-hover morris-default-style'
                          };
                      Severity: Minor
                      Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

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

                          function d3_transitionNode(node, i, id, inherit) {
                            var lock = node.__transition__ || (node.__transition__ = {
                              active: 0,
                              count: 0
                            }), transition = lock[id];
                        Severity: Minor
                        Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

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

                            function d3_scale_linear(domain, range, interpolate, clamp) {
                              var output, input;
                              function rescale() {
                                var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
                                output = linear(domain, range, uninterpolate, interpolate);
                          Severity: Minor
                          Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

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

                              d3.svg.chord = function() {
                                var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
                                function chord(d, i) {
                                  var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
                                  return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
                            Severity: Minor
                            Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

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

                                this.stackData = function() {
                              
                                  var data = this.series.active()
                                    .map( function(d) { return d.data } )
                                    .map( function(d) { return d.filter( function(d) { return this._slice(d) }, this ) }, this);
                              Severity: Minor
                              Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        if ( ( mappedTypes || origType === handleObj.origType ) &&
                                          ( !handler || handler.guid === handleObj.guid ) &&
                                          ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                          ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                          handlers.splice( j, 1 );
                                Severity: Critical
                                Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

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

                                    render: function(args) {
                                  
                                      var graph = this.graph;
                                      var points = args.points;
                                      var point = points.filter( function(p) { return p.active } ).shift();
                                  Severity: Minor
                                  Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            if (lx > rx) {
                                              if (!va) va = {
                                                x: (y0 - fb) / fm,
                                                y: y0
                                              }; else if (va.y >= y1) return;
                                    Severity: Major
                                    Found in cabot/static/arachnys/js/d3.js and 1 other location - About 2 hrs to fix
                                    cabot/static/arachnys/js/d3.js on lines 5068..5077

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 75.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            if (ly < ry) {
                                              if (!va) va = {
                                                x: x0,
                                                y: fm * x0 + fb
                                              }; else if (va.x >= x1) return;
                                    Severity: Major
                                    Found in cabot/static/arachnys/js/d3.js and 1 other location - About 2 hrs to fix
                                    cabot/static/arachnys/js/d3.js on lines 5088..5097

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 75.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                            } else {
                                              if (!va) va = {
                                                x: x1,
                                                y: fm * x1 + fb
                                              }; else if (va.x < x0) return;
                                    Severity: Major
                                    Found in cabot/static/arachnys/js/d3.js and 1 other location - About 2 hrs to fix
                                    cabot/static/arachnys/js/d3.js on lines 5079..5088

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 75.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language