Showing 292 of 636 total issues
Avoid too many return
statements within this function. Open
return -1;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return -1;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return -1;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return -1;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
else return -1;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
else return -1;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
else return -1;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return compareTo(a.chapterUrl, b.chapterUrl);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
if (a.shortName > b.shortName) return 1;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return compareTo(a.name, b.name);
- Create a ticketCreate a ticket
Function isMirrorEnabled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function isMirrorEnabled(mirrorName) {
if (states != undefined) {
for (var i = 0; i < states.length; i++) {
if (states[i].mirror == mirrorName) {
return states[i].state;
- 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 hasDesactivatedOnce
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function hasDesactivatedOnce() {
var states = localStorage["mirrorStates"];
var lstTmp = JSON.parse(states);
var nbActi = 0;
if (lstTmp.length > 0) {
- 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 initManifestVars
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function initManifestVars() {
var xhr = new XMLHttpRequest();
xhr.open("GET", chrome.extension.getURL('manifest.json'), false);
xhr.onreadystatechange = function () {
if (this.readyState == 4) {
- 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 activatedMirrors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function activatedMirrors() {
var list = new Array();
var states = localStorage["mirrorStates"];
var lstTmp = JSON.parse(states);
if (lstTmp.length > 0) {
- 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 grayscale
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function grayscale(cnv, w, h) {
var imageData = cnv.getImageData(0, 0, w, h);
for (var j = 0; j < imageData.height; j++) {
for (var i = 0; i < imageData.width; i++) {
var index = (i * 4) * imageData.width + (j * 4);
- 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 isNew
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function isNew(mg) {
"use strict";
var ret = false;
if (mg.read === 0) {
if (mg.listChaps.length > 0) {
- 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 createMangaEntry
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function createMangaEntry(mangas, where) {
"use strict";
if (parameters.popupMode === 1) {
try {
createMangaEntryBlock(mangas, where);
- 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 hasNew
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function hasNew() {
for (var i = 0; i < mangaList.length; i++) {
if (mangaList[i].listChaps.length > 0) {
var lastName = mangaList[i].listChaps[0][1];
if (lastName != mangaList[i].lastChapterReadURL && mangaList[i].read == 0) {
- 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"