levent/agileista

View on GitHub

Showing 149 of 317 total issues

Avoid deeply nested control flow statements.
Open

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

    Function d3_geom_quadtreeVisit has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
    Severity: Minor
    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                    if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;
      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 (subnode = subnodes[k]) d3_transitionNode(subnode, k, id, transition);
        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

            Consider simplifying this complex logical expression.
            Open

                    if (abs(x3 - x2) > ε || abs(y3 - y2) > ε) {
                      halfEdges.splice(iHalfEdge, 0, new d3_geom_voronoiHalfEdge(d3_geom_voronoiCreateBorderEdge(cell.site, end, abs(x3 - x0) < ε && y1 - y3 > ε ? {
                        x: x0,
                        y: abs(x2 - x0) < ε ? y2 : y1
                      } : abs(y3 - y1) < ε && x1 - x3 > ε ? {
            Severity: Major
            Found in app/assets/javascripts/d3.v3/d3.v3.js - About 40 mins to fix

              Function updateTaskCard has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  updateTaskCard = function(container, task_card, hours, devs, me) {
              Severity: Minor
              Found in app/assets/javascripts/task_board.js - About 35 mins to fix

                Function quadtree has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  d3.geom.quadtree = function(points, x1, y1, x2, y2) {
                Severity: Minor
                Found in app/assets/javascripts/d3.v3/d3.v3.js - About 35 mins to fix

                  Function drawBurndown has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      drawBurndown = function(startDate, endDate, spRemaining, spComplete, spHours) {
                  Severity: Minor
                  Found in app/assets/javascripts/agileista_graphs.js - About 35 mins to fix

                    Function d3_geo_clipPolygon has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) {
                    Severity: Minor
                    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 35 mins to fix

                      Method search_by_query has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def search_by_query(search_query, page, project_id, all_sprints = false)
                            raise ArgumentError unless project_id
                            search(per_page: 100, page: page, load: true) do |search|
                              search.query do |query|
                                query.filtered do |f|
                      Severity: Minor
                      Found in app/models/user_story/elastic_searchable.rb - About 35 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 too many return statements within this function.
                      Open

                          return (rfocx + lfocx) / 2;
                      Severity: Major
                      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                if (r < t0) return;
                        Severity: Major
                        Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  if (r < t0) return;
                          Severity: Major
                          Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                      }; else if (va.y >= y1) return;
                            Severity: Major
                            Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      if (r > t1) return;
                              Severity: Major
                              Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        if (r > t1) return;
                                Severity: Major
                                Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          if (r < t0) return;
                                  Severity: Major
                                  Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                              }; else if (va.y < y0) return;
                                    Severity: Major
                                    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                }; else if (va.x >= x1) return;
                                      Severity: Major
                                      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language