Showing 240 of 537 total issues
Function loadSkillToEditor
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function loadSkillToEditor (skill, global) {
document.getElementById('newSkillName').value = skill.name;
document.getElementById('newSkillDesc').value = skill.description;
document.getElementById('newSkillIcon').value = skill.skillIcon;
document.getElementById('newSkillWiki').value = skill.descriptionWikipediaURL;
- 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 loadSkillToEditor
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function loadSkillToEditor (skill, global) {
document.getElementById('newSkillName').value = skill.name;
document.getElementById('newSkillDesc').value = skill.description;
document.getElementById('newSkillIcon').value = skill.skillIcon;
document.getElementById('newSkillWiki').value = skill.descriptionWikipediaURL;
- 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 LayerTextureCache
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
var LayerTextureCache = (function () {
function LayerTextureCache(layer) {
this.layer = layer;
this.renderTexture = null;
this.doubleBuffer = null;
Function LayerTextureCache
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
var LayerTextureCache = (function () {
function LayerTextureCache(layer) {
this.layer = layer;
this.renderTexture = null;
this.doubleBuffer = null;
Function drawConnectionLines
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
drawConnectionLines() {
var connectionGroup = new PIXI.display.Group(-1, false);
for (var j = 0; j < this.skills.length; j++) {
if (this.skills[j].children !== undefined) {
- 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 drawConnectionLines
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
drawConnectionLines() {
var connectionGroup = new PIXI.display.Group(-1, false);
for (var j = 0; j < this.skills.length; j++) {
if (this.skills[j].children !== undefined) {
- 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 drawConnectionLines
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
drawConnectionLines() {
var connectionGroup = new PIXI.display.Group(-1, false);
for (var j = 0; j < this.skills.length; j++) {
if (this.skills[j].children !== undefined) {
- 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 refreshAvaliability
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
refreshAvaliability(){
for (var i = 0; i < this.skills.length; i++) {
for (var j = 0; j < this.skills[i].parents.length; j++) {
var par = this.skills.find(obj => obj.name == this.skills[i].parents[j]);
- 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 refreshAvaliability
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
refreshAvaliability(){
for (var i = 0; i < this.skills.length; i++) {
for (var j = 0; j < this.skills[i].parents.length; j++) {
var par = this.skills.find(obj => obj.name == this.skills[i].parents[j]);
- 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 refreshAvaliability
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
refreshAvaliability(){
for (var i = 0; i < this.skills.length; i++) {
for (var j = 0; j < this.skills[i].parents.length; j++) {
var par = this.skills.find(obj => obj.name == this.skills[i].parents[j]);
- 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 showChart
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showChart() {
document.getElementById('creator').style.display = "none";
document.getElementById('approveTrees').style.display = "none";
document.getElementById('approveSkills').style.display = "none";
document.getElementById('pixiCanvas').style.display = "block";
Function showChart
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showChart() {
document.getElementById('creator').style.display = "none";
document.getElementById('approveTrees').style.display = "none";
document.getElementById('approveSkills').style.display = "none";
document.getElementById('pixiCanvas').style.display = "block";
Function showChart
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showChart() {
document.getElementById('creator').style.display = "none";
document.getElementById('approveTrees').style.display = "none";
document.getElementById('approveSkills').style.display = "none";
document.getElementById('pixiCanvas').style.display = "block";
Function loadSkillToEditor
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadSkillToEditor (skill, global) {
document.getElementById('newSkillName').value = skill.name;
document.getElementById('newSkillDesc').value = skill.description;
document.getElementById('newSkillIcon').value = skill.skillIcon;
document.getElementById('newSkillWiki').value = skill.descriptionWikipediaURL;
Function loadSkillToEditor
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadSkillToEditor (skill, global) {
document.getElementById('newSkillName').value = skill.name;
document.getElementById('newSkillDesc').value = skill.description;
document.getElementById('newSkillIcon').value = skill.skillIcon;
document.getElementById('newSkillWiki').value = skill.descriptionWikipediaURL;
Function onclick
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadSkill.onclick =function(){
//request for the skill to load data from
var skillname = document.getElementById('newSkillName').value;
skillData = {
Function editTree
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editTree () {
$('.clear').find('input:text').val('');
$('.clear').find('textarea').val('');
hideMenus();
Function editTree
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editTree () {
$('.clear').find('input:text').val('');
$('.clear').find('textarea').val('');
hideMenus();
Function onRightClick
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
onRightClick() {
if (this.parentObj.self) {
var children = this.parentObj.skill.children;
// Decrease skill level
- 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 getPublicSkillData
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPublicSkillData(){
var skillToSearch = {value: document.getElementById('cardSearchBar').value};
document.getElementById("searchModalTitle").innerHTML = "Click on a skill, to view its details!";
request('POST', '/protected/getPublicSkillData', skillToSearch, function() {
if(this.readyState == 4 && this.status == 200) {