dhgwilliam/google-voice-stats

View on GitHub

Showing 371 of 371 total issues

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

    jQuery.fn[ type ] = function( size ) {
        // Get window width or height
        var elem = this[0];
        if ( !elem ) {
            return size == null ? null : this;
Severity: Minor
Found in public/js/jquery.js - About 1 hr to fix

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

        find: function( selector ) {
            var self = this,
                i, l;
    
            if ( typeof selector !== "string" ) {
    Severity: Minor
    Found in public/js/jquery.js - About 1 hr to fix

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

        d3.svg.diagonal = function() {
          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,
              y: m
      Severity: Minor
      Found in public/js/d3.v2.js - About 1 hr to fix

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

            function position(row, u, rect, flush) {
              var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
              if (u == rect.dx) {
                if (flush || v > rect.dy) v = rect.dy;
                while (++i < n) {
        Severity: Minor
        Found in public/js/d3.v2.js - About 1 hr to fix

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

              function brush(g) {
                g.each(function() {
                  var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
                  g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
                  bg.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
          Severity: Minor
          Found in public/js/d3.v2.js - About 1 hr to fix

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

              function d3_geo_greatArcInterpolator() {
                function interpolate(t) {
                  var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;
                  return [ Math.atan2(y, x) / d3_geo_radians, Math.atan2(z, Math.sqrt(x * x + y * y)) / d3_geo_radians ];
                }
            Severity: Minor
            Found in public/js/d3.v2.js - About 1 hr to fix

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

                    function apportion(node, previousSibling, ancestor) {
                      if (previousSibling) {
                        var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift;
                        while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
                          vom = d3_layout_treeLeft(vom);
              Severity: Minor
              Found in public/js/d3.v2.js - About 1 hr to fix

                Method generate_sip_corpus has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  def generate_sip_corpus
                    sip_corpus = {}
                    Person.all.each do |person|
                      unless person.id == "1"
                        @dictionary = sips_for(person.id, false)
                Severity: Minor
                Found in helpers.rb - 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 setup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        setup: function() {
                
                            if ( rformElems.test( this.nodeName ) ) {
                                // IE doesn't fire change on a check/radio until blur; trigger it on click
                                // after a propertychange. Eat the blur-change in special.change.handle.
                Severity: Minor
                Found in public/js/jquery.js - About 1 hr to fix

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

                      html: function( value ) {
                          if ( value === undefined ) {
                              return this[0] && this[0].nodeType === 1 ?
                                  this[0].innerHTML.replace(rinlinejQuery, "") :
                                  null;
                  Severity: Minor
                  Found in public/js/jquery.js - About 1 hr to fix

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

                        addClass: function( value ) {
                            var classNames, i, l, elem,
                                setClass, c, cl;
                    
                            if ( jQuery.isFunction( value ) ) {
                    Severity: Minor
                    Found in public/js/jquery.js - About 1 hr to fix

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

                          show: function( speed, easing, callback ) {
                              var elem, display;
                      
                              if ( speed || speed === 0 ) {
                                  return this.animate( genFx("show", 3), speed, easing, callback );
                      Severity: Minor
                      Found in public/js/jquery.js - About 1 hr to fix

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

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

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

                            function d3_time_scaleExtent(domain) {
                              var start = domain[0], stop = domain[domain.length - 1];
                              return start < stop ? [ start, stop ] : [ stop, start ];
                            }
                          Severity: Major
                          Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
                          public/js/d3.v2.js on lines 656..659

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

                          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 ( jQuery.isFunction( html ) ) {
                                      return this.each(function(i) {
                                          jQuery(this).wrapInner( html.call(this, i) );
                                      });
                                  }
                          Severity: Major
                          Found in public/js/jquery.js and 1 other location - About 1 hr to fix
                          public/js/jquery.js on lines 5682..5686

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

                          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

                                q.push({
                                  i: s.push(s.pop() + "skewX(", null, ")") - 2,
                                  x: d3.interpolateNumber(wa, wb)
                                });
                          Severity: Major
                          Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
                          public/js/d3.v2.js on lines 3247..3250

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

                          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

                                q.push({
                                  i: s.push(s.pop() + "rotate(", null, ")") - 2,
                                  x: d3.interpolateNumber(ra, rb)
                                });
                          Severity: Major
                          Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
                          public/js/d3.v2.js on lines 3255..3258

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

                          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

                                  reset: function( elem ) {
                                      var name = elem.nodeName.toLowerCase();
                                      return (name === "input" || name === "button") && "reset" === elem.type;
                                  },
                          Severity: Major
                          Found in public/js/jquery.js and 1 other location - About 1 hr to fix
                          public/js/jquery.js on lines 4525..4528

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

                          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 ( jQuery.isFunction( html ) ) {
                                      return this.each(function(i) {
                                          jQuery(this).wrapAll( html.call(this, i) );
                                      });
                                  }
                          Severity: Major
                          Found in public/js/jquery.js and 1 other location - About 1 hr to fix
                          public/js/jquery.js on lines 5711..5715

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

                          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

                                  submit: function( elem ) {
                                      var name = elem.nodeName.toLowerCase();
                                      return (name === "input" || name === "button") && "submit" === elem.type;
                                  },
                          Severity: Major
                          Found in public/js/jquery.js and 1 other location - About 1 hr to fix
                          public/js/jquery.js on lines 4534..4537

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

                          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