Showing 165 of 196 total issues

Avoid deeply nested control flow statements.
Open

                    if ( conv && s[ "throws" ] ) {
                        response = conv( response );
                    } else {
                        try {
                            response = conv( response );
Severity: Major
Found in app/js/jquery.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if ( !xhrCallbacks ) {
                                    xhrCallbacks = {};
                                    jQuery( window ).unload( xhrOnUnloadAbort );
                                }
    Severity: Major
    Found in app/js/jquery.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
                              contains( context, elem ) && elem.id === m ) {
                              results.push( elem );
                              return results;
                          }
      Severity: Major
      Found in app/js/jquery.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if ( (seed = find(
                                token.matches[0].replace( runescape, funescape ),
                                rsibling.test( tokens[0].type ) && context.parentNode || context
                            )) ) {
        
        
        Severity: Major
        Found in app/js/jquery.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              for ( conv2 in converters ) {
          
                                  // If conv2 outputs current
                                  tmp = conv2.split( " " );
                                  if ( tmp[ 1 ] === current ) {
          Severity: Major
          Found in app/js/jquery.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
                                        cur = cur.replace( " " + clazz + " ", " " );
                                    }
            Severity: Major
            Found in app/js/jquery.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      for ( match in context ) {
                                          // Properties of context are called as methods if possible
                                          if ( jQuery.isFunction( this[ match ] ) ) {
                                              this[ match ]( context[ match ] );
              
              
              Severity: Major
              Found in app/js/jquery.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if ( !(unmatched[i] || setMatched[i]) ) {
                                                setMatched[i] = pop.call( results );
                                            }
                Severity: Major
                Found in app/js/jquery.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
                                              cur += clazz + " ";
                                          }
                  Severity: Major
                  Found in app/js/jquery.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if ( matches[ sel ] === undefined ) {
                                                matches[ sel ] = handleObj.needsContext ?
                                                    jQuery( sel, this ).index( cur ) >= 0 :
                                                    jQuery.find( sel, this, null, [ cur ] ).length;
                                            }
                    Severity: Major
                    Found in app/js/jquery.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
                                                          // Cache the index of each encountered element
                                                          if ( useCache ) {
                                                              (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
                                                          }
                      Severity: Major
                      Found in app/js/jquery.js - About 45 mins to fix

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

                            init: function( elem, options, prop, end, easing, unit ) {
                        Severity: Minor
                        Found in app/js/jquery.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ( deleteExpando ) {
                                                      delete elem[ internalKey ];
                          
                                                  } else if ( typeof elem.removeAttribute !== core_strundefined ) {
                                                      elem.removeAttribute( internalKey );
                          Severity: Major
                          Found in app/js/jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if ( copyIsArray ) {
                                                    copyIsArray = false;
                                                    clone = src && jQuery.isArray(src) ? src : [];
                            
                                                } else {
                            Severity: Major
                            Found in app/js/jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                  if ( xhr.readyState !== 4 ) {
                                                                      xhr.abort();
                                                                  }
                              Severity: Major
                              Found in app/js/jquery.js - About 45 mins to fix

                                Method score_qualifier has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def score_qualifier(score_formatted)
                                    return nil if score_formatted.to_s.empty?
                                    return 'poor' if score_formatted.to_i < 51
                                    return 'good' if score_formatted.to_i > 80
                                    return 'average' if score_formatted.to_i.between?(51, 80)
                                Severity: Minor
                                Found in helpers.rb - About 45 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

                                Consider simplifying this complex logical expression.
                                Open

                                if ( !jQuery.support.opacity ) {
                                    jQuery.cssHooks.opacity = {
                                        get: function( elem, computed ) {
                                            // IE uses filters for opacity
                                            return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
                                Severity: Major
                                Found in app/js/jquery.js - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                      if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
                                          return;
                                      }
                                  Severity: Major
                                  Found in app/js/jquery.js - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                if ( matcher[ expando ] ) {
                                                    // Find the next relative operator (if any) for proper handling
                                                    j = ++i;
                                                    for ( ; j < len; j++ ) {
                                                        if ( Expr.relative[ tokens[j].type ] ) {
                                    Severity: Major
                                    Found in app/js/jquery.js - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                          if ( support.matchesSelector && documentIsHTML &&
                                              ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
                                              ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
                                      
                                              try {
                                      Severity: Major
                                      Found in app/js/jquery.js - About 40 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language