erikroyall/hilo

View on GitHub

Showing 179 of 292 total issues

Avoid deeply nested control flow statements.
Open

                  if (!contains(parts[_i])) {
                    el.classList.add(parts[_i]);
                  }
Severity: Major
Found in build/hilo.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                      if (contains(parts[_i])) {
                        el.classList.remove(parts[_i]);
                      }
    Severity: Major
    Found in build/hilo.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      if (!contains(parts[_i])) {
                        el.className += " " +  parts[_i];
                      }
      Severity: Major
      Found in build/hilo.js - About 45 mins to fix

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

          var indexOf = function indexOf(arr, sought /*, fromIndex */ ) {
            var self = splitString && arr.toString() === "[object String]" ?
                    this.split("") :
                    toObject(this)
              , length = self.length >>> 0;
        Severity: Minor
        Found in src/util.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

        Avoid deeply nested control flow statements.
        Open

                        if (contains(parts[_i])) {
                          el.classList.remove(parts[_i]);
                        } else {
                          el.classList.add(parts[_i]);
                        }
        Severity: Major
        Found in build/hilo.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                        if (v) {
                          partial.push(quote(k) + (gap ? ": " : ":") + v);
                        }
          Severity: Major
          Found in build/hilo-legacy.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                          if (v) {
                            partial.push(quote(k) + (gap ? ": " : ":") + v);
                          }
            Severity: Major
            Found in build/hilo-legacy.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                              if (v !== undefined) {
                                value[k] = v;
                              } else {
                                delete value[k];
                              }
              Severity: Major
              Found in src/polyfill.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 src/sizzle.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                if (v) {
                                  partial.push(quote(k) + (gap ? ": " : ":") + v);
                                }
                  Severity: Major
                  Found in src/polyfill.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 src/sizzle.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                        if (contains) {
                                          el.className.replace(className, "");
                                        } else {
                                          el.className += " " +  className;
                                        }
                      Severity: Major
                      Found in src/dom.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                        if (contains(parts[_i])) {
                                          el.className.replace(parts[_i], "");
                                        } else {
                                          el.className += " " +  parts[_i];
                                        }
                        Severity: Major
                        Found in build/hilo.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          if (contains(parts[_i])) {
                                            el.classList.remove(parts[_i]);
                                          }
                          Severity: Major
                          Found in src/dom.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                            if (v !== undefined) {
                                              value[k] = v;
                                            } else {
                                              delete value[k];
                                            }
                            Severity: Major
                            Found in build/hilo-legacy.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 build/hilo-legacy.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                  if (!contains(parts[_i])) {
                                                    el.className += " " +  parts[_i];
                                                  }
                                Severity: Major
                                Found in src/dom.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                  if (contains(parts[_i])) {
                                                    el.className.replace(parts[_i], "");
                                                  }
                                  Severity: Major
                                  Found in src/dom.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                  if (v) {
                                                    partial.push(quote(k) + (gap ? ": " : ":") + v);
                                                  }
                                    Severity: Major
                                    Found in build/hilo.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                      if (contains(parts[_i])) {
                                                        el.className.replace(parts[_i], "");
                                                      } else {
                                                        el.className += " " +  parts[_i];
                                                      }
                                      Severity: Major
                                      Found in src/dom.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language