erikroyall/hilo

View on GitHub

Showing 179 of 292 total issues

Function matcherFromGroupMatchers has 72 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 build/hilo-legacy.js - About 2 hrs to fix

    Function classify has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      hilo.classify = function () {
        var body = win.Hilo("body")
          , classes = ["js"]
          , _i;
        // Remove the default no-js class
    Severity: Major
    Found in src/misc.js - About 2 hrs to fix

      Function classify has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      hilo.classify = function () {
          var body = win.Hilo("body")
            , classes = ["js"]
            , _i;
          // Remove the default no-js class
      Severity: Major
      Found in build/hilo.js - About 2 hrs to fix

        Function classify has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        hilo.classify = function () {
            var body = win.Hilo("body")
              , classes = ["js"]
              , _i;
            // Remove the default no-js class
        Severity: Major
        Found in build/hilo-legacy.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 src/sizzle.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 build/hilo.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 src/polyfill.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 build/hilo-legacy.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 build/hilo-legacy.js - About 2 hrs to fix

                    Function superMatcher has 64 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 src/sizzle.js - About 2 hrs to fix

                      Function superMatcher has 64 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 build/hilo-legacy.js - About 2 hrs to fix

                        Function exports has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                        module.exports = function(grunt) {
                        
                          "use strict";
                          
                          var itsbeen = "// "
                        Severity: Minor
                        Found in Gruntfile.js - 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 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 build/hilo-legacy.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 src/sizzle.js - About 2 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                            if (forward && useCache) {
                                              // Seek `elem` from a previously-cached index
                                              outerCache = parent[expando] || (parent[expando] = {});
                                              cache = outerCache[type] || [];
                                              nodeIndex = cache[0] === dirruns && cache[1];
                            Severity: Critical
                            Found in build/hilo-legacy.js - About 2 hrs to fix

                              Consider simplifying this complex logical expression.
                              Open

                                              if (forward && useCache) {
                                                // Seek `elem` from a previously-cached index
                                                outerCache = parent[expando] || (parent[expando] = {});
                                                cache = outerCache[type] || [];
                                                nodeIndex = cache[0] === dirruns && cache[1];
                              Severity: Critical
                              Found in src/sizzle.js - About 2 hrs to fix

                                Function fade has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    fade: function (inOut, timing) {
                                      if (inOut === "in") {
                                        this.show();
                                      }
                                
                                
                                Severity: Minor
                                Found in src/fx.js - 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 select has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function select(selector, context, results, seed) {
                                      var i, tokens, token, type, find,
                                        match = tokenize(selector);
                                
                                      if (!seed) {
                                Severity: Minor
                                Found in build/hilo-legacy.js - About 1 hr to fix

                                  Function select has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function select(selector, context, results, seed) {
                                        var i, tokens, token, type, find,
                                          match = tokenize(selector);
                                  
                                        if (!seed) {
                                  Severity: Minor
                                  Found in src/sizzle.js - About 1 hr to fix

                                    Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function tokenize(selector, parseOnly) {
                                          var matched, match, tokens, type,
                                            soFar, groups, preFilters,
                                            cached = tokenCache[selector + " "];
                                    
                                    
                                    Severity: Minor
                                    Found in build/hilo-legacy.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language