dhgwilliam/google-voice-stats

View on GitHub

Showing 231 of 371 total issues

Function trigger has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    trigger: function( event, data, elem, onlyHandlers ) {
        // Don't do events on text and comment nodes
        if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
            return;
        }
Severity: Major
Found in public/js/jquery.js - About 3 hrs to fix

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

                    send: function( headers, complete ) {
    
                        // Get a new xhr
                        var xhr = s.xhr(),
                            handle,
    Severity: Major
    Found in public/js/jquery.js - About 3 hrs to fix

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

        d3_selectionPrototype.data = function(value, key) {
          function bind(group, groupData) {
            var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), n1 = Math.max(n, m), updateNodes = [], enterNodes = [], exitNodes = [], node, nodeData;
            if (key) {
              var nodeByKeyValue = new d3_Map, keyValues = [], keyValue, j = groupData.length;
      Severity: Major
      Found in public/js/d3.v2.js - About 3 hrs to fix

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

            function tree(d, i) {
              function firstWalk(node, previousSibling) {
                var children = node.children, layout = node._tree;
                if (children && (n = children.length)) {
                  var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1;
        Severity: Major
        Found in public/js/d3.v2.js - About 3 hrs to fix

          Function animate has 83 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              animate: function( prop, speed, easing, callback ) {
                  var optall = jQuery.speed( speed, easing, callback );
          
                  if ( jQuery.isEmptyObject( prop ) ) {
                      return this.each( optall.complete, [ false ] );
          Severity: Major
          Found in public/js/jquery.js - About 3 hrs to fix

            Function clean has 83 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                clean: function( elems, context, fragment, scripts ) {
                    var checkScriptType;
            
                    context = context || document;
            
            
            Severity: Major
            Found in public/js/jquery.js - About 3 hrs to fix

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

                  function axis(g) {
                    g.each(function() {
                      var g = d3.select(this);
                      var ticks = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain() : tickValues, tickFormat = tickFormat_ == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String : tickFormat_;
                      var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide), subtick = g.selectAll(".minor").data(subticks, String), subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6), subtickExit = d3.transition(subtick.exit()).style("opacity", 1e-6).remove(), subtickUpdate = d3.transition(subtick).style("opacity", 1);
              Severity: Major
              Found in public/js/d3.v2.js - About 3 hrs to fix

                Function Deferred has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Deferred: function( func ) {
                        var doneList = jQuery.Callbacks( "once memory" ),
                            failList = jQuery.Callbacks( "once memory" ),
                            progressList = jQuery.Callbacks( "memory" ),
                            state = "pending",
                Severity: Major
                Found in public/js/jquery.js - About 3 hrs to fix

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

                    function d3_dsv(delimiter, mimeType) {
                      function dsv(url, callback) {
                        d3.text(url, mimeType, function(text) {
                          callback(text && dsv.parse(text));
                        });
                  Severity: Major
                  Found in public/js/d3.v2.js - About 3 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                    if ( "getBoundingClientRect" in document.documentElement ) {
                        jQuery.fn.offset = function( options ) {
                            var elem = this[0], box;
                    
                            if ( options ) {
                    Severity: Critical
                    Found in public/js/jquery.js - About 3 hrs to fix

                      Function d3_scale_ordinal has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function d3_scale_ordinal(domain, ranger) {
                          function scale(x) {
                            return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length];
                          }
                          function steps(start, step) {
                      Severity: Major
                      Found in public/js/d3.v2.js - About 2 hrs to fix

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

                                function doAnimation() {
                                    // XXX 'this' does not always have a nodeName when running the
                                    // test suite
                        
                                    if ( optall.queue === false ) {
                        Severity: Major
                        Found in public/js/jquery.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) {
                              function area(data) {
                                function segment() {
                                  segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z");
                                }
                          Severity: Major
                          Found in public/js/d3.v2.js - About 2 hrs to fix

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

                                add: function( elem, types, handler, data, selector ) {
                            
                                    var elemData, eventHandle, events,
                                        t, tns, type, namespaces, handleObj,
                                        handleObjIn, quick, handlers, special;
                            Severity: Major
                            Found in public/js/jquery.js - About 2 hrs to fix

                              Method person_by has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def person_by(person = nil, time_period = "month")
                                  messages = []
                                  unless person.nil?
                                    Message.find(:sent_by_id => person.id).union(:sent_to_id => person.id).each {|message| messages << message}
                                  else
                              Severity: Minor
                              Found in helpers.rb - About 2 hrs 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 done has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function done( status, nativeStatusText, responses, headers ) {
                              
                                          // Called once
                                          if ( state === 2 ) {
                                              return;
                              Severity: Major
                              Found in public/js/jquery.js - About 2 hrs to fix

                                Function filter has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                Sizzle.filter = function( expr, set, inplace, not ) {
                                    var match, anyFound,
                                        type, found, item, filter, left,
                                        i, pass,
                                        old = expr,
                                Severity: Major
                                Found in public/js/jquery.js - About 2 hrs to fix

                                  Function init has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      init: function( selector, context, rootjQuery ) {
                                          var match, elem, ret, doc;
                                  
                                          // Handle $(""), $(null), or $(undefined)
                                          if ( !selector ) {
                                  Severity: Major
                                  Found in public/js/jquery.js - About 2 hrs to fix

                                    Function hull has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      d3.geom.hull = function(vertices) {
                                        if (vertices.length < 3) return [];
                                        var len = vertices.length, plen = len - 1, points = [], stack = [], i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
                                        for (i = 1; i < len; ++i) {
                                          if (vertices[i][1] < vertices[h][1]) {
                                    Severity: Major
                                    Found in public/js/d3.v2.js - About 2 hrs to fix

                                      Function relayout has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function relayout() {
                                            var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
                                            chords = [];
                                            groups = [];
                                            k = 0, i = -1;
                                      Severity: Major
                                      Found in public/js/d3.v2.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language