codefirst/AsakusaSatellite

View on GitHub

Showing 209 of 252 total issues

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

    var callbacks = function () {

        // for string, boolean, number and null
        function useStrictEquality(b, a) {
            if (b instanceof a.constructor || a instanceof b.constructor) {
Severity: Major
Found in qunit/lib/qunit/qunit.js - About 3 hrs to fix

    Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Animation( elem, properties, options ) {
        var result,
            stopped,
            index = 0,
            length = animationPrefilters.length,
    Severity: Major
    Found in app/assets/javascripts/jquery.js - About 3 hrs to fix

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

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

        Function finish has 78 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            finish: function() {
                if ( this.expected && this.expected != this.assertions.length ) {
                    QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" );
                }
                
        Severity: Major
        Found in qunit/lib/qunit/qunit.js - About 3 hrs to fix

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

          function Sizzle( selector, context, results, seed ) {
              var match, elem, m, nodeType,
                  // QSA vars
                  i, groups, old, nid, newContext, newSelector;
          
          
          Severity: Major
          Found in app/assets/javascripts/jquery.js - About 3 hrs to fix

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

                buildFragment: function( elems, context, scripts, selection ) {
                    var j, elem, contains,
                        tmp, tag, tbody, wrap,
                        l = elems.length,
            
            
            Severity: Major
            Found in app/assets/javascripts/jquery.js - About 2 hrs to fix

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

                  add: function( elem, types, handler, data, selector ) {
                      var tmp, events, t, handleObjIn,
                          special, eventHandle, handleObj,
                          handlers, type, namespaces, origType,
                          elemData = jQuery._data( elem );
              Severity: Major
              Found in app/assets/javascripts/jquery.js - About 2 hrs to fix

                Method list has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                Open

                      def list
                        room_id    = params[:room_id]
                        since_id   = params[:since_id]
                        newer_than = params[:newer_than]
                        until_id   = params[:until_id]
                Severity: Minor
                Found in app/controllers/api/v1/message_controller.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 matcherFromGroupMatchers has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                    // A counter to specify which element is currently being matched
                    var matcherCachedRuns = 0,
                        bySet = setMatchers.length > 0,
                        byElement = elementMatchers.length > 0,
                Severity: Major
                Found in app/assets/javascripts/jquery.js - About 2 hrs to fix

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

                      $.fn.scrollTo = function( target, duration, settings ){
                          if( typeof duration == 'object' ){
                              settings = duration;
                              duration = 0;
                          }
                  Severity: Major
                  Found in app/assets/javascripts/jquery-scrollTo.js - About 2 hrs to fix

                    Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function done( status, nativeStatusText, responses, headers ) {
                                var isSuccess, success, error, response, modified,
                                    statusText = nativeStatusText;
                    
                                // Called once
                    Severity: Major
                    Found in app/assets/javascripts/jquery.js - About 2 hrs to fix

                      Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                          if ( postFilter && !postFilter[ expando ] ) {
                              postFilter = setMatcher( postFilter );
                          }
                          if ( postFinder && !postFinder[ expando ] ) {
                      Severity: Major
                      Found in app/assets/javascripts/jquery.js - About 2 hrs to fix

                        Function str has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function str(key, holder) {
                        
                        // Produce a string from holder[key].
                        
                                var i,          // The loop counter.
                        Severity: Major
                        Found in public/socky/v0.5.0/assets/json2.js - About 2 hrs to fix

                          Function superMatcher has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  superMatcher = function( seed, context, xml, results, expandContext ) {
                                      var elem, j, matcher,
                                          setMatched = [],
                                          matchedCount = 0,
                                          i = "0",
                          Severity: Major
                          Found in app/assets/javascripts/jquery.js - About 2 hrs to fix

                            Method messages_between has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def messages_between(from, to, count, order = nil)
                                conditions = {:room_id => self.id}
                                if from
                                  conditions[:_id.gte] = from[:id] if     from[:include_boundary]
                                  conditions[:_id.gt]  = from[:id] unless from[:include_boundary]
                            Severity: Minor
                            Found in app/models/room.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 Deferred has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                Deferred: function( func ) {
                                    var tuples = [
                                            // action, add listener, listener list, final state
                                            [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                                            [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
                            Severity: Major
                            Found in app/assets/javascripts/jquery.js - About 2 hrs to fix

                              Function handleRemote has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  handleRemote: function(element) {
                                    var method, url, data, elCrossDomain, crossDomain, withCredentials, dataType, options;
                              
                                    if (rails.fire(element, 'ajax:before')) {
                                      elCrossDomain = element.data('cross-domain');
                              Severity: Major
                              Found in app/assets/javascripts/rails.js - About 2 hrs to fix

                                Function diff has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function diff(o, n){
                                        var ns = new Object();
                                        var os = new Object();
                                        
                                        for (var i = 0; i < n.length; i++) {
                                Severity: Major
                                Found in qunit/lib/qunit/qunit.js - About 2 hrs to fix

                                  Function CHILD has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          "CHILD": function( type, what, argument, first, last ) {
                                              var simple = type.slice( 0, 3 ) !== "nth",
                                                  forward = type.slice( -4 ) !== "last",
                                                  ofType = what === "of-type";
                                  
                                  
                                  Severity: Major
                                  Found in app/assets/javascripts/jquery.js - About 2 hrs to fix

                                    File jquery-textcomplete.js has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /**
                                     * jQuery.textcomplete.js
                                     *
                                     * Repositiory: https://github.com/yuku-t/jquery-textcomplete
                                     * License:     MIT
                                    Severity: Minor
                                    Found in app/assets/javascripts/jquery-textcomplete.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language