erikroyall/hilo

View on GitHub

Showing 179 of 292 total issues

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 matcherFromTokens has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function matcherFromTokens(tokens) {
          var checkContext, matcher, j,
            len = tokens.length,
            leadingRelative = Expr.relative[tokens[0].type],
            implicitRelative = leadingRelative || Expr.relative[" "],
    Severity: Minor
    Found in build/hilo-legacy.js - About 1 hr to fix

      Function matcherFromTokens has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function matcherFromTokens(tokens) {
            var checkContext, matcher, j,
              len = tokens.length,
              leadingRelative = Expr.relative[tokens[0].type],
              implicitRelative = leadingRelative || Expr.relative[" "],
      Severity: Minor
      Found in src/sizzle.js - About 1 hr to fix

        Function unitize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function unitize (unit, prop) {
        
            /* All the CSS props. that are to be defaulted to px values */
            var pixel = {
              "width": true,
        Severity: Minor
        Found in src/dom.js - About 1 hr to fix

          Function unitize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function unitize (unit, prop) {
          
              /* All the CSS props. that are to be defaulted to px values */
              var pixel = {
                "width": true,
          Severity: Minor
          Found in build/hilo-legacy.js - About 1 hr to fix

            Function unitize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function unitize (unit, prop) {
            
                /* All the CSS props. that are to be defaulted to px values */
                var pixel = {
                  "width": true,
            Severity: Minor
            Found in build/hilo.js - About 1 hr to fix

              Function addCombinator has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function addCombinator(matcher, combinator, base) {
                    var dir = combinator.dir,
                      checkNonElements = base && dir === "parentNode",
                      doneName = done++;
              
              
              Severity: Minor
              Found in build/hilo-legacy.js - About 1 hr to fix

                Function addCombinator has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function addCombinator(matcher, combinator, base) {
                      var dir = combinator.dir,
                        checkNonElements = base && dir === "parentNode",
                        doneName = done++;
                
                
                Severity: Minor
                Found in src/sizzle.js - About 1 hr to fix

                  Function fade has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      fade: function (inOut, timing) {
                        if (inOut === "in") {
                          this.show();
                        }
                  
                  
                  Severity: Minor
                  Found in src/fx.js - About 1 hr to fix

                    Function fade has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        fade: function (inOut, timing) {
                          if (inOut === "in") {
                            this.show();
                          }
                    
                    
                    Severity: Minor
                    Found in build/hilo.js - About 1 hr to fix

                      Function fade has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          fade: function (inOut, timing) {
                            if (inOut === "in") {
                              this.show();
                            }
                      
                      
                      Severity: Minor
                      Found in build/hilo-legacy.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                        } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
                                          diff = cache[1];
                        
                                        // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
                                        } else {
                        Severity: Critical
                        Found in src/sizzle.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                          } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
                                            diff = cache[1];
                          
                                          // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
                                          } else {
                          Severity: Critical
                          Found in build/hilo-legacy.js - About 1 hr to fix

                            Function parse has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  json.parse = function (text, reviver) {
                            
                                    // The parse method takes a text and an optional reviver function, and returns
                                    // a JavaScript value if the text is a valid json text.
                            
                            
                            Severity: Minor
                            Found in build/hilo.js - About 1 hr to fix

                              Function parse has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    json.parse = function (text, reviver) {
                              
                                      // The parse method takes a text and an optional reviver function, and returns
                                      // a JavaScript value if the text is a valid json text.
                              
                              
                              Severity: Minor
                              Found in build/hilo-legacy.js - About 1 hr to fix

                                Function parse has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      json.parse = function (text, reviver) {
                                
                                        // The parse method takes a text and an optional reviver function, and returns
                                        // a JavaScript value if the text is a valid json text.
                                
                                
                                Severity: Minor
                                Found in src/polyfill.js - About 1 hr to fix

                                  Function fire has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      fire: (function () {
                                        if (document.dispatchEvent) {
                                          return function (event) {
                                            var evt;
                                            
                                  Severity: Minor
                                  Found in src/evt.js - About 1 hr to fix

                                    Function fire has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        fire: (function () {
                                          if (document.dispatchEvent) {
                                            return function (event) {
                                              var evt;
                                              
                                    Severity: Minor
                                    Found in build/hilo-legacy.js - About 1 hr to fix

                                      Function fire has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          fire: (function () {
                                            if (document.dispatchEvent) {
                                              return function (event) {
                                                var evt;
                                                
                                      Severity: Minor
                                      Found in build/hilo.js - About 1 hr to fix

                                        Function create has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                          hilo.create = function (tagName, attrs) {
                                            var el = new Dom([document.createElement(tagName)]), key;
                                        
                                            if (attrs) {
                                              /* Add Class if the `className` is set */
                                        Severity: Minor
                                        Found in src/dom.js - About 1 hr 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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language