levent/agileista

View on GitHub

Showing 149 of 317 total issues

Function diagonal has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.svg.diagonal = function() {
    var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;
    function diagonal(d, i) {
      var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
        x: p0.x,
Severity: Minor
Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

    Function d3_selection_on has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function d3_selection_on(type, listener, capture) {
        var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener;
        if (i > 0) type = type.substring(0, i);
        var filter = d3_selection_onFilters.get(type);
        if (filter) type = filter, wrap = d3_selection_onFilter;
    Severity: Minor
    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

      Function d3_geo_centroidRingStart has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function d3_geo_centroidRingStart() {
          var λ00, φ00, x0, y0, z0;
          d3_geo_centroid.point = function(λ, φ) {
            λ00 = λ, φ00 = φ;
            d3_geo_centroid.point = nextPoint;
      Severity: Minor
      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

        Function d3_geom_voronoiCloseCells has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function d3_geom_voronoiCloseCells(extent) {
            var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end;
            while (iCell--) {
              cell = cells[iCell];
              if (!cell || !cell.prepare()) continue;
        Severity: Minor
        Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

          Function TaskBoard has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

          var TaskBoard = (function(){
            "use strict";
          
            var self = this ,
          
          
          Severity: Minor
          Found in app/assets/javascripts/task_board.js - About 1 hr 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 d3_geo_pointInPolygon has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function d3_geo_pointInPolygon(point, polygon) {
              var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, winding = 0;
              d3_geo_areaRingSum.reset();
              for (var i = 0, n = polygon.length; i < n; ++i) {
                var ring = polygon[i], m = ring.length;
          Severity: Minor
          Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

            Function d3_geom_voronoi has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function d3_geom_voronoi(sites, bbox) {
                var site = sites.sort(d3_geom_voronoiVertexOrder).pop(), x0, y0, circle;
                d3_geom_voronoiEdges = [];
                d3_geom_voronoiCells = new Array(sites.length);
                d3_geom_voronoiBeaches = new d3_geom_voronoiRedBlackTree();
            Severity: Minor
            Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

              Function brushmove has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    function brushmove() {
                      var point = d3.mouse(target), moved = false;
                      if (offset) {
                        point[0] += offset[0];
                        point[1] += offset[1];
              Severity: Minor
              Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

                Function insertChild has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      function insertChild(n, d, x, y, x1, y1, x2, y2) {
                Severity: Major
                Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

                  Function insert has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        function insert(n, d, x, y, x1, y1, x2, y2) {
                  Severity: Major
                  Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

                    Method update has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def update
                        if @user_story.update_attributes(user_story_params)
                          flash[:notice] = "User story updated successfully"
                          notify_integrations(:user_story_updated)
                          redirect_to edit_project_user_story_path(@project, @user_story) and return false if params[:commit] == 'Save'
                    Severity: Minor
                    Found in app/controllers/user_stories_controller.rb - About 55 mins 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

                    Avoid deeply nested control flow statements.
                    Open

                                for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]);
                    Severity: Major
                    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
                                    if (d3_layout_packIntersects(k, c)) {
                                      break;
                                    }
                                  }
                      Severity: Major
                      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                    for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);
                        Severity: Major
                        Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                      if (d3_layout_packIntersects(j, c)) {
                                        isect = 1;
                                        break;
                                      }
                          Severity: Major
                          Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                        if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
                            Severity: Major
                            Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                        while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
                              Severity: Major
                              Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                            for (j = i + 1; j < n; ++j) q[j].i--;
                                Severity: Major
                                Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                            while (++i < n) if (!value.contains(name[i])) return false;
                                  Severity: Major
                                  Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                  if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;
                                    Severity: Major
                                    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language