levent/agileista

View on GitHub

Showing 317 of 317 total issues

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 app/assets/javascripts/d3.v3/d3.v3.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 app/assets/javascripts/d3.v3/d3.v3.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 app/assets/javascripts/d3.v3/d3.v3.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 app/assets/javascripts/d3.v3/d3.v3.js - About 4 hrs to fix

          Function drawBurndown has 99 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              drawBurndown = function(startDate, endDate, spRemaining, spComplete, spHours) {
                $('#chart').html('');
                var margin = {top: 20, right: 50, bottom: 30, left: 50},
                    width = 900 - margin.left - margin.right,
                    height = 350 - margin.top - margin.bottom,
          Severity: Major
          Found in app/assets/javascripts/agileista_graphs.js - About 3 hrs to fix

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

                  alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;
            Severity: Major
            Found in app/assets/javascripts/d3.v3/d3.v3.js and 1 other location - About 3 hrs to fix
            app/assets/javascripts/d3.v3/d3.v3.js on lines 3837..3837

            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 111.

            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

                  hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;
            Severity: Major
            Found in app/assets/javascripts/d3.v3/d3.v3.js and 1 other location - About 3 hrs to fix
            app/assets/javascripts/d3.v3/d3.v3.js on lines 3836..3836

            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 111.

            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

            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 app/assets/javascripts/d3.v3/d3.v3.js - About 3 hrs to fix

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

                  function tree(d, i) {
                    var nodes = hierarchy.call(this, d, i), root = nodes[0];
                    function firstWalk(node, previousSibling) {
                      var children = node.children, layout = node._tree;
                      if (children && (n = children.length)) {
              Severity: Major
              Found in app/assets/javascripts/d3.v3/d3.v3.js - About 3 hrs to fix

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

                    remove: function(node) {
                      if (node.N) node.N.P = node.P;
                      if (node.P) node.P.N = node.N;
                      node.N = node.P = null;
                      var parent = node.U, sibling, left = node.L, right = node.R, next, red;
                Severity: Major
                Found in app/assets/javascripts/d3.v3/d3.v3.js - About 3 hrs to fix

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

                      countComplete = function() {
                        var complete_stories = $('div.user-story[data-status="complete"]');
                        var complete_points = $.map(complete_stories, function(element) {
                          return(Number($(element).attr('data-points')));
                        });
                  Severity: Major
                  Found in app/assets/javascripts/task_board.js and 2 other locations - About 3 hrs to fix
                  app/assets/javascripts/task_board.js on lines 52..62
                  app/assets/javascripts/task_board.js on lines 64..74

                  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 104.

                  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 3 locations. Consider refactoring.
                  Open

                      countInprogress = function() {
                        var inprogress_stories = $('div.user-story[data-status="inprogress"]');
                        var inprogress_points = $.map(inprogress_stories, function(element) {
                          return(Number($(element).attr('data-points')));
                        });
                  Severity: Major
                  Found in app/assets/javascripts/task_board.js and 2 other locations - About 3 hrs to fix
                  app/assets/javascripts/task_board.js on lines 40..50
                  app/assets/javascripts/task_board.js on lines 52..62

                  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 104.

                  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 3 locations. Consider refactoring.
                  Open

                      countIncomplete = function() {
                        var incomplete_stories = $('div.user-story[data-status="incomplete"]');
                        var incomplete_points = $.map(incomplete_stories, function(element) {
                          return(Number($(element).attr('data-points')));
                        });
                  Severity: Major
                  Found in app/assets/javascripts/task_board.js and 2 other locations - About 3 hrs to fix
                  app/assets/javascripts/task_board.js on lines 40..50
                  app/assets/javascripts/task_board.js on lines 64..74

                  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 104.

                  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

                  Function d3_geo_clip has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {
                      return function(rotate, listener) {
                        var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);
                        var clip = {
                          point: point,
                  Severity: Major
                  Found in app/assets/javascripts/d3.v3/d3.v3.js - About 3 hrs to fix

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

                      d3_time.second = d3_time_interval(function(date) {
                        return new d3_date(Math.floor(date / 1e3) * 1e3);
                      }, function(date, offset) {
                        date.setTime(date.getTime() + Math.floor(offset) * 1e3);
                      }, function(date) {
                    Severity: Major
                    Found in app/assets/javascripts/d3.v3/d3.v3.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/d3.v3/d3.v3.js on lines 9114..9120

                    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 103.

                    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

                      d3_time.minute = d3_time_interval(function(date) {
                        return new d3_date(Math.floor(date / 6e4) * 6e4);
                      }, function(date, offset) {
                        date.setTime(date.getTime() + Math.floor(offset) * 6e4);
                      }, function(date) {
                    Severity: Major
                    Found in app/assets/javascripts/d3.v3/d3.v3.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/d3.v3/d3.v3.js on lines 9105..9111

                    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 103.

                    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

                      function d3_svg_lineStepAfter(points) {
                        var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
                        while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
                        return path.join("");
                      }
                    Severity: Major
                    Found in app/assets/javascripts/d3.v3/d3.v3.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/d3.v3/d3.v3.js on lines 7949..7953

                    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 102.

                    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

                      function d3_svg_lineStepBefore(points) {
                        var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
                        while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
                        return path.join("");
                      }
                    Severity: Major
                    Found in app/assets/javascripts/d3.v3/d3.v3.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/d3.v3/d3.v3.js on lines 7954..7958

                    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 102.

                    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

                    Function TaskBoard has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var TaskBoard = (function(){
                      "use strict";
                    
                      var self = this ,
                    
                    
                    Severity: Major
                    Found in app/assets/javascripts/task_board.js - About 3 hrs to fix

                      Function data has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        d3_selectionPrototype.data = function(value, key) {
                          var i = -1, n = this.length, group, node;
                          if (!arguments.length) {
                            value = new Array(n = (group = this[0]).length);
                            while (++i < n) {
                      Severity: Major
                      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 3 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language