Showing 292 of 636 total issues
Avoid deeply nested control flow statements. Open
if (server[i].cats.length > 0) {
if (foundEx.cats.length == 0) {
isDiff = true;
} else {
for (var k = 0; k < server[i].cats.length; k++) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!divMode) $("img", trTmp).css("max-width", ((screen.width-200) / 2) + 'px');
- Create a ticketCreate a ticket
Function loadScript
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
jQuery.loadScript = function (url, arg1, arg2, errorfunc, datatyp) {
"use strict";
var cache = false,
callback = null,
load = true,
- Read upRead up
- Create a ticketCreate a ticket
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 (window.pageYOffset >= document.documentElement.scrollHeight - window.innerHeight) {
if (nextRight) {
if ($("#nChapBtn0").size()>0) {
window.location.href = $("#nChapBtn0").attr("href");
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (ancCan.width() > (screen.width-200) / 2) {
width = (screen.width-200) / 2;
} else {
width = ancCan.width();
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (curimg !== null && curimg.size() > 0) {
//Check if top and bottom of this image are visible
viss = topbotVis(curimg[0]);
//If bottom not visible
if (!viss.bottomVis && !doubleTap) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (mangaList[i].cats[j] == request.cat) {
toRem[toRem.length] = j;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (othMg.length > 0) {
for (var i = 0; i < othMg.length; i++) {
othMg.update = request.update;
}
saveList();
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (ancCan.width() > (screen.width-200)) {
width = (screen.width-200);
} else {
width = ancCan.width();
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (server[i].cats.length > 0) {
isDiff = true;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (mangaList[i].cats[j] == request.cat) {
mangaList[i].cats[j] = request.newcat;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!viss.topVis && !doubleTap) {
//Move to top of current scan
$.scrollTo($(curimg).closest("tr")[0], 800, {queue:true});
} else {
//Calculate previous scan id
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (tab.url && tab.url === "https://github.com/AllMangasReader-dev/AMR/commits/develop") {
chrome.tabs.update(tab.id, {
selected : true
});
return;
- Create a ticketCreate a ticket
Function addResult
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function addResult(idTest, statut, testTxt, res, comment) {
- Create a ticketCreate a ticket
Function loadScript
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
jQuery.loadScript = function (url, arg1, arg2, errorfunc, datatyp) {
- Create a ticketCreate a ticket
Function getElementsByClass
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getElementsByClass(searchClass, obj) {
if (!obj) {
obj = document;
}
- Read upRead up
- Create a ticketCreate a ticket
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 getTimeSince
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getTimeSince(timeDif) {
"use strict";
var txt = "";
if (timeDif !== undefined) {
var tmpDif = (new Date().getTime() - timeDif) / 1000;
- Read upRead up
- Create a ticketCreate a ticket
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 callbackListChaps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function callbackListChaps(list, select) {
var hasSelected = false;
for (var j = 0; j < list.length; j++) {
var optTmp = $("<option value=\"" + list[j][1] + "\">" + list[j][0] + "</option>");
if ($(select).data("mangaCurUrl").indexOf(list[j][1]) != - 1 && !hasSelected) {
- Read upRead up
- Create a ticketCreate a ticket
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 updateServer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function updateServer(tsServer, tsExt, modifsInExt) {
console.log("server : " + tsServer + " ext : " + tsExt + " hasModifs : " + modifsInExt);
if (tsServer == 0) {
return 0;
} else {
- Read upRead up
- Create a ticketCreate a ticket
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 refreshSearchAll
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function refreshSearchAll(toSearch) {
isOver = false;
tempMirrorListAll = [];
nbToLoad = mirrors.length;
ancNbToLoad = nbToLoad;
- Read upRead up
- Create a ticketCreate a ticket
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"