jacquev6/variadic

View on GitHub

Showing 164 of 201 total issues

Avoid deeply nested control flow statements.
Open

                    if ( (nid = context.getAttribute( "id" )) ) {
                        nid = nid.replace( rcssescape, fcssescape );
                    } else {
                        context.setAttribute( "id", (nid = expando) );
                    }
Severity: Major
Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if ( (elem = matcherOut[i]) ) {
                                // Restore matcherIn since elem is not yet a final match
                                temp.push( (matcherIn[i] = elem) );
                            }
    Severity: Major
    Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ( ( event.result = ret ) === false ) {
                                  event.preventDefault();
                                  event.stopPropagation();
                              }
      Severity: Major
      Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

        Function splitQuery has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        function splitQuery(query) {
            var result = [];
            var start = -1;
            for (var i = 0; i < query.length; i++) {
                if (splitChars[query.charCodeAt(i)]) {
        Severity: Minor
        Found in docs/_static/documentation_options.js - 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 (terms[excluded[i]] == file ||
                    titleterms[excluded[i]] == file ||
                    $u.contains(terms[excluded[i]] || [], file) ||
                    $u.contains(titleterms[excluded[i]] || [], file)) {
                  valid = false;
        Severity: Major
        Found in docs/_static/searchtools.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 docs/_static/jquery-3.2.1.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                    if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                            context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
            
                        context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                        if ( !context ) {
            Severity: Major
            Found in docs/_static/jquery-3.2.1.js - About 40 mins to fix

              Function CHILD has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      "CHILD": function( type, what, argument, first, last ) {
              Severity: Minor
              Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix

                Function condense has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function condense( unmatched, map, filter, context, xml ) {
                Severity: Minor
                Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix

                  Function augmentWidthOrHeight has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
                  Severity: Minor
                  Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix

                    Function add has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        add: function( elem, types, handler, data, selector ) {
                    Severity: Minor
                    Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix

                      Function remove has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          remove: function( elem, types, handler, selector, mappedTypes ) {
                      Severity: Minor
                      Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix

                        Function Tween has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        function Tween( elem, options, prop, end, easing ) {
                        Severity: Minor
                        Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix

                          Function superMatcher has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  superMatcher = function( seed, context, xml, results, outermost ) {
                          Severity: Minor
                          Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix

                            Function buildFragment has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            function buildFragment( elems, context, scripts, selection, ignored ) {
                            Severity: Minor
                            Found in docs/_static/jquery-3.2.1.js - About 35 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  if (className != toString.call(b)) return false;
                              Severity: Major
                              Found in docs/_static/underscore-1.3.1.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                        return results;
                                Severity: Major
                                Found in docs/_static/jquery-3.2.1.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          return elem[ name ];
                                  Severity: Major
                                  Found in docs/_static/jquery-3.2.1.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                return sortInput ?
                                                    ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
                                                    0;
                                    Severity: Major
                                    Found in docs/_static/jquery-3.2.1.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                          return results;
                                      Severity: Major
                                      Found in docs/_static/jquery-3.2.1.js - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language