Showing 179 of 292 total issues
Function tokenize
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function tokenize(selector, parseOnly) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[selector + " "];
Function matcherFromTokens
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromTokens(tokens) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[tokens[0].type],
implicitRelative = leadingRelative || Expr.relative[" "],
Function matcherFromTokens
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromTokens(tokens) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[tokens[0].type],
implicitRelative = leadingRelative || Expr.relative[" "],
Function unitize
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function unitize (unit, prop) {
/* All the CSS props. that are to be defaulted to px values */
var pixel = {
"width": true,
Function unitize
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function unitize (unit, prop) {
/* All the CSS props. that are to be defaulted to px values */
var pixel = {
"width": true,
Function unitize
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function unitize (unit, prop) {
/* All the CSS props. that are to be defaulted to px values */
var pixel = {
"width": true,
Function addCombinator
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addCombinator(matcher, combinator, base) {
var dir = combinator.dir,
checkNonElements = base && dir === "parentNode",
doneName = done++;
Function addCombinator
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addCombinator(matcher, combinator, base) {
var dir = combinator.dir,
checkNonElements = base && dir === "parentNode",
doneName = done++;
Function fade
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fade: function (inOut, timing) {
if (inOut === "in") {
this.show();
}
Function fade
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fade: function (inOut, timing) {
if (inOut === "in") {
this.show();
}
Function fade
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fade: function (inOut, timing) {
if (inOut === "in") {
this.show();
}
Consider simplifying this complex logical expression. Open
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 {
Consider simplifying this complex logical expression. Open
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 {
Function parse
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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.
Function parse
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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.
Function parse
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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.
Function fire
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fire: (function () {
if (document.dispatchEvent) {
return function (event) {
var evt;
Function fire
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fire: (function () {
if (document.dispatchEvent) {
return function (event) {
var evt;
Function fire
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fire: (function () {
if (document.dispatchEvent) {
return function (event) {
var evt;
Function create
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
hilo.create = function (tagName, attrs) {
var el = new Dom([document.createElement(tagName)]), key;
if (attrs) {
/* Add Class if the `className` is set */
- Read upRead up
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"