Showing 297 of 342 total issues
Avoid deeply nested control flow statements. Open
Open
for (o = 0, u = t.length; o < u; o++) s.indexOf(" " + t[o] + " ") < 0 && (s += t[o] + " ");
Avoid deeply nested control flow statements. Open
Open
for (; r < s; r++) if (i.relative[e[r].type]) break;
Avoid deeply nested control flow statements. Open
Open
if (!e) return S.apply(n, x.call(r, 0)), n;
Avoid deeply nested control flow statements. Open
Open
if (!s || !s.parentNode) return n;
Avoid deeply nested control flow statements. Open
Open
if (data[key][i] !== undefined && unique[data[key][i] + ""] === undefined) {
t += "&" + URI.buildQueryParameter(key, data[key][i]);
if (duplicates !== true) {
unique[data[key][i] + ""] = true;
}
Function init
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
init: function(e, t, n, r, i, s) {
Avoid deeply nested control flow statements. Open
Open
if (n !== !0) if (n && e["throws"]) t = n(t);
else try {
t = n(t)
} catch (l) {
return {
Avoid deeply nested control flow statements. Open
Open
} else if (t.ownerDocument && (s = t.ownerDocument.getElementById(f)) && u(t, s) && s.id === f) return n.push(s), n
Avoid deeply nested control flow statements. Open
Open
if (data[key][i] !== undefined && unique[data[key][i] + ""] === undefined) {
t += "&" + URI.buildQueryParameter(key, data[key][i]);
if (duplicates !== true) {
unique[data[key][i] + ""] = true;
}
Function init
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
init: function(e, t, n, r, i, s) {
Avoid deeply nested control flow statements. Open
Open
for (o = 0, u = t.length; o < u; o++) s.indexOf(" " + t[o] + " ") < 0 && (s += t[o] + " ");
Avoid deeply nested control flow statements. Open
Open
for (s = 0, o = n.length; s < o; s++) while (r.indexOf(" " + n[s] + " ") >= 0) r = r.replace(" " + n[s] + " ", " ");
Avoid deeply nested control flow statements. Open
Open
if (data[name] === value) {
data[name] = undefined;
} else if (isArray(data[name])) {
data[name] = filterArrayValues(data[name], value);
}
Avoid deeply nested control flow statements. Open
Open
for (; r < s; r++) if (i.relative[e[r].type]) break;
Avoid deeply nested control flow statements. Open
Open
if (t > 0) for (i = r; i < o.length; i++) for (s = 0; s < r; s++) if (o[s] === o[i]) {
o.splice(i--, 1);
break
}
Avoid deeply nested control flow statements. Open
Open
if (one_map[key][i] !== two_map[key][i]) {
return false;
}
Avoid deeply nested control flow statements. Open
Open
if (!e) return S.apply(n, x.call(r, 0)), n;
Function start
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
master.start = function () {
verbose('Starting master');
var options = config;
var workerFile = (options._ ? options._[0] : null);
- 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"
Further reading
Function ct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function ct(e, t, n, r, i, s) {
Avoid deeply nested control flow statements. Open
Open
if (!n) for (r in a) {
s = r.split(" ");
if (s[1] === i) {
n = a[u + " " + s[0]] || a["* " + s[0]];
if (n) {