AllMangasReader-dev/AMR

View on GitHub

Showing 292 of 636 total issues

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) {
Severity: Minor
Found in js/popup.js - About 25 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

Function isReady has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function isReady(status_readyT, reasonT) {
    "use strict";
    if (status_readyT === false) {
        chrome.browserAction.setIcon({
            path : "img/blue-sharingan.png"
Severity: Minor
Found in js/background.js - About 25 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

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) {
Severity: Minor
Found in js/background.js - About 25 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

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) {
Severity: Minor
Found in js/background.js - About 25 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

Function findRealName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function findRealName(extobj) {
  var res = "";
  if (extobj.listChaps != undefined) {
    for (var i = 0; i < extobj.listChaps.length; i++) {
      if (extobj.listChaps[i][1] == extobj.lastChapterReadURL) {
Severity: Minor
Found in js/listmanager.js - About 25 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

Function isMirrorEnable has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function isMirrorEnable(mirrorName) {
    "use strict";
    if (localStorage.bookmarkMirrorsState !== undefined) {
        var obj = JSON.parse(localStorage.bookmarkMirrorsState),
            i;
Severity: Minor
Found in js/bookmarks.js - About 25 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

Function fillCurrentLstSingleMg has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function fillCurrentLstSingleMg(lstCur, nbForPij) {
    var nameCur = lstCur[lstCur.length - 1].name;
    var trCur;
    if (nbForPij % 2 === 0) {
        trCur = $("<tr class='odd'></tr>");
Severity: Minor
Found in js/popupSearch.js - About 25 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

Function loadImageAMR has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function loadImageAMR(where, url, img, pos, res, mode, second) {
  if (!second) {
    $(img).data("urlToLoad", url);
    $(img).data("resize", res.resize);
    $(img).data("modedisplay", mode);
Severity: Minor
Found in js/back.js - About 25 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

Function createProgression has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function createProgression(nb, nbTot, where, hideText) {
  var value = 0;
  if (nb != nbTot) {
    if (nbTot < 2) {
      value = 100;
Severity: Minor
Found in js/listmanager.js - About 25 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

Function isMirrorEnable has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function isMirrorEnable(mirrorName) {
    if (localStorage["searchMirrorsState"] !== undefined) {
        var obj = JSON.parse(localStorage["searchMirrorsState"]);
        for (var i = 0; i < obj.length; i++) {
            if (obj[i].mirror == mirrorName) {
Severity: Minor
Found in js/popupSearch.js - About 25 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

Function findChapNo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function findChapNo(extobj) {
  var pos = 0;
  if (extobj.listChaps != undefined) {
    for (var i = 0; i < extobj.listChaps.length; i++) {
      if (extobj.listChaps[i][1] == extobj.lastChapterReadURL) {
Severity: Minor
Found in js/listmanager.js - About 25 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

Function add_bookmark_button has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function add_bookmark_button () {
    "use strict";
    var obj = {
        action: "addUpdateBookmark",
        mirror: $("#bookmarkData").data("mirror"),
Severity: Minor
Found in js/back.js - About 25 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

Severity
Category
Status
Source
Language