levent/agileista

View on GitHub

Showing 317 of 317 total issues

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

    function d3_time_parseWeekday(date, string, i) {
      d3_time_dayRe.lastIndex = 0;
      var n = d3_time_dayRe.exec(string.substring(i));
      return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
    }
Severity: Major
Found in app/assets/javascripts/d3.v3/d3.v3.js and 3 other locations - About 3 hrs to fix
app/assets/javascripts/d3.v3/d3.v3.js on lines 2602..2606
app/assets/javascripts/d3.v3/d3.v3.js on lines 2612..2616
app/assets/javascripts/d3.v3/d3.v3.js on lines 2617..2621

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

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

    function d3_time_parseMonthAbbrev(date, string, i) {
      d3_time_monthAbbrevRe.lastIndex = 0;
      var n = d3_time_monthAbbrevRe.exec(string.substring(i));
      return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
    }
Severity: Major
Found in app/assets/javascripts/d3.v3/d3.v3.js and 3 other locations - About 3 hrs to fix
app/assets/javascripts/d3.v3/d3.v3.js on lines 2602..2606
app/assets/javascripts/d3.v3/d3.v3.js on lines 2607..2611
app/assets/javascripts/d3.v3/d3.v3.js on lines 2617..2621

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

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

    function d3_time_parseMonth(date, string, i) {
      d3_time_monthRe.lastIndex = 0;
      var n = d3_time_monthRe.exec(string.substring(i));
      return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
    }
Severity: Major
Found in app/assets/javascripts/d3.v3/d3.v3.js and 3 other locations - About 3 hrs to fix
app/assets/javascripts/d3.v3/d3.v3.js on lines 2602..2606
app/assets/javascripts/d3.v3/d3.v3.js on lines 2607..2611
app/assets/javascripts/d3.v3/d3.v3.js on lines 2612..2616

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

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

    function d3_time_parseWeekdayAbbrev(date, string, i) {
      d3_time_dayAbbrevRe.lastIndex = 0;
      var n = d3_time_dayAbbrevRe.exec(string.substring(i));
      return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
    }
Severity: Major
Found in app/assets/javascripts/d3.v3/d3.v3.js and 3 other locations - About 3 hrs to fix
app/assets/javascripts/d3.v3/d3.v3.js on lines 2607..2611
app/assets/javascripts/d3.v3/d3.v3.js on lines 2612..2616
app/assets/javascripts/d3.v3/d3.v3.js on lines 2617..2621

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

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_resample has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function d3_geo_resample(project) {
    var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;
    function resample(stream) {
      return (maxDepth ? resampleRecursive : resampleNone)(stream);
    }
Severity: Major
Found in app/assets/javascripts/d3.v3/d3.v3.js - About 3 hrs to fix

    Function Agileista has 76 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function albersUsa has 76 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        d3.geo.albersUsa = function() {
          var lower48 = d3.geo.albers();
          var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);
          var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);
          var point, pointStream = {
      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

            while (lArc.circle && abs(x - lArc.circle.x) < ε && abs(y - lArc.circle.cy) < ε) {
              previous = lArc.P;
              disappearing.unshift(lArc);
              d3_geom_voronoiDetachBeach(lArc);
              lArc = previous;
        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 4835..4840

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

        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

            while (rArc.circle && abs(x - rArc.circle.x) < ε && abs(y - rArc.circle.cy) < ε) {
              next = rArc.N;
              disappearing.push(rArc);
              d3_geom_voronoiDetachBeach(rArc);
              rArc = next;
        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 4826..4831

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

        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_scale_ordinal has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function d3_scale_ordinal(domain, ranger) {
            var index, range, rangeBand;
            function scale(x) {
              return range[((index.get(x) || ranger.t === "range" && index.set(x, domain.push(x))) - 1) % range.length];
            }
        Severity: Major
        Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

          Function d3_locale_numberFormat has 73 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function d3_locale_numberFormat(locale) {
              var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping ? function(value) {
                var i = value.length, t = [], j = 0, g = locale_grouping[0];
                while (i > 0 && g > 0) {
                  t.push(value.substring(i -= g, i + g));
          Severity: Major
          Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

            Function d3_geom_voronoiConnectEdge has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function d3_geom_voronoiConnectEdge(edge, extent) {
                var vb = edge.b;
                if (vb) return true;
                var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb;
                if (ry === ly) {
            Severity: Major
            Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

              Function graticule has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                d3.geo.graticule = function() {
                  var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;
                  function graticule() {
                    return {
                      type: "MultiLineString",
              Severity: Major
              Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                Function d3_xhr has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function d3_xhr(url, mimeType, response, callback) {
                    var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null;
                    if (d3_window.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest();
                    "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {
                      request.readyState > 3 && respond();
                Severity: Major
                Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                  Function quadtree has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function quadtree(data) {
                        var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;
                        if (x1 != null) {
                          x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;
                        } else {
                  Severity: Major
                  Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                    Function d3_svg_area has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function d3_svg_area(projection) {
                        var x0 = d3_geom_pointX, x1 = d3_geom_pointX, y0 = 0, y1 = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
                        function area(data) {
                          var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
                            return x;
                    Severity: Major
                    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                      Function d3_geo_projectionMutator has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function d3_geo_projectionMutator(projectAt) {
                          var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) {
                            x = project(x, y);
                            return [ x[0] * k + δx, δy - x[1] * k ];
                          }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream;
                      Severity: Major
                      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

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

                          function d3_time_parseWeekdayNumber(date, string, i) {
                            d3_time_numberRe.lastIndex = 0;
                            var n = d3_time_numberRe.exec(string.substring(i, i + 1));
                            return n ? (date.w = +n[0], i + n[0].length) : -1;
                          }
                        Severity: Major
                        Found in app/assets/javascripts/d3.v3/d3.v3.js and 7 other locations - About 2 hrs to fix
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2669..2673
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2691..2695
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2696..2700
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2701..2705
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2706..2710
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2711..2715
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2716..2720

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

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

                          function d3_time_parseMinutes(date, string, i) {
                            d3_time_numberRe.lastIndex = 0;
                            var n = d3_time_numberRe.exec(string.substring(i, i + 2));
                            return n ? (date.M = +n[0], i + n[0].length) : -1;
                          }
                        Severity: Major
                        Found in app/assets/javascripts/d3.v3/d3.v3.js and 7 other locations - About 2 hrs to fix
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2654..2658
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2669..2673
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2691..2695
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2696..2700
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2701..2705
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2711..2715
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2716..2720

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

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

                          function d3_time_parseMilliseconds(date, string, i) {
                            d3_time_numberRe.lastIndex = 0;
                            var n = d3_time_numberRe.exec(string.substring(i, i + 3));
                            return n ? (date.L = +n[0], i + n[0].length) : -1;
                          }
                        Severity: Major
                        Found in app/assets/javascripts/d3.v3/d3.v3.js and 7 other locations - About 2 hrs to fix
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2654..2658
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2669..2673
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2691..2695
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2696..2700
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2701..2705
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2706..2710
                        app/assets/javascripts/d3.v3/d3.v3.js on lines 2711..2715

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

                        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