erikroyall/hilo

View on GitHub

Showing 179 of 292 total issues

Function sizzle has a Cognitive Complexity of 595 (exceeds 5 allowed). Consider refactoring.
Open

  var sizzle = (function() {

    if (feature.qsa3 === true) {
      return;
    }
Severity: Minor
Found in src/sizzle.js - About 1 wk 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

File hilo-legacy.js has 3285 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// # Hilo

// `0.1.0-pre-dev-beta-10`<br/>

// Built on: 2015-05-06<br/>
Severity: Major
Found in build/hilo-legacy.js - About 1 wk to fix

    Function sizzle has 1345 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var sizzle = (function() {
    
        if (feature.qsa3 === true) {
          return;
        }
    Severity: Major
    Found in build/hilo-legacy.js - About 6 days to fix

      Function sizzle has 1345 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var sizzle = (function() {
      
          if (feature.qsa3 === true) {
            return;
          }
      Severity: Major
      Found in src/sizzle.js - About 6 days to fix

        File hilo.js has 1932 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // # Hilo
        
        // `0.1.0-pre-dev-beta-10`<br/>
        
        // Built on: 2015-05-06<br/>
        Severity: Major
        Found in build/hilo.js - About 5 days to fix

          File sizzle.js has 1347 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          
            // querySelector pollyfill using Sizzle
          
            var sizzle = (function() {
          
          
          Severity: Major
          Found in src/sizzle.js - About 3 days to fix

            Function class has a Cognitive Complexity of 137 (exceeds 5 allowed). Consider refactoring.
            Open

                "class": feature.classList === true ? function (action, className) {
                  return this.each(function (el) {
                    var _i, parts, contains, res = [];
            
                    if (typeof className === "string") { // A String
            Severity: Minor
            Found in src/dom.js - About 2 days 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

            File dom.js has 502 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            
              //
              // ### Main DOM Class
              //
              // ** Params: **
            Severity: Major
            Found in src/dom.js - About 1 day to fix

              Function setDocument has 200 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  setDocument = Sizzle.setDocument = function(node) {
                    var doc = node ? node.ownerDocument || node : preferredDoc,
                      parent = doc.defaultView;
              
                    // If no document and documentElement is available, return
              Severity: Major
              Found in src/sizzle.js - About 1 day to fix

                Function setDocument has 200 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    setDocument = Sizzle.setDocument = function(node) {
                      var doc = node ? node.ownerDocument || node : preferredDoc,
                        parent = doc.defaultView;
                
                      // If no document and documentElement is available, return
                Severity: Major
                Found in build/hilo-legacy.js - About 1 day to fix

                  File detect.js has 471 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                    
                    // ## Feature Detection
                    feature = (function () {
                      var c = function (tagName) {
                          return doc.createElement(tagName);
                  Severity: Minor
                  Found in src/detect.js - About 7 hrs to fix

                    Function classify has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                    Open

                      hilo.classify = function () {
                        var body = win.Hilo("body")
                          , classes = ["js"]
                          , _i;
                        // Remove the default no-js class
                    Severity: Minor
                    Found in src/misc.js - About 5 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 exports has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function(grunt) {
                    
                      "use strict";
                      
                      var itsbeen = "// "
                    Severity: Major
                    Found in Gruntfile.js - About 5 hrs to fix

                      `` has 34 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                        extend(Dom.prototype, {
                      
                          // ## Helper Functions
                      
                          // 
                      Severity: Minor
                      Found in src/dom.js - About 4 hrs to fix

                        Function class has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            "class": feature.classList === true ? function (action, className) {
                              return this.each(function (el) {
                                var _i, parts, contains, res = [];
                        
                                if (typeof className === "string") { // A String
                        Severity: Major
                        Found in src/dom.js - About 4 hrs to fix

                          Function class has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              "class": feature.classList === true ? function (action, className) {
                                return this.each(function (el) {
                                  var _i, parts, contains, res = [];
                          
                                  if (typeof className === "string") { // A String
                          Severity: Major
                          Found in build/hilo.js - About 4 hrs to fix

                            Function class has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                "class": feature.classList === true ? function (action, className) {
                                  return this.each(function (el) {
                                    var _i, parts, contains, res = [];
                            
                                    if (typeof className === "string") { // A String
                            Severity: Major
                            Found in build/hilo-legacy.js - About 4 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 src/sizzle.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 build/hilo-legacy.js - About 3 hrs to fix

                                  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
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language