Showing 240 of 537 total issues
Function _finishInteractionProcess
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_finishInteractionProcess: function (event, func) {
var queue = this._queue;
var q = queue[0];
var i = 0;
for (; i < q.length; i++) {
Function refreshAvaliability
has 27 lines of code (exceeds 25 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]);
Function _finishInteractionProcess
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_finishInteractionProcess: function (event, func) {
var queue = this._queue;
var q = queue[0];
var i = 0;
for (; i < q.length; i++) {
Function getPublicTreeData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPublicTreeData(){
var treeToSearch = {value: document.getElementById('cardSearchBar').value};
request('POST', '/protected/getPublicTreeData', treeToSearch, function() {
if(this.readyState == 4 && this.status == 200) {
var modal = document.getElementById('searchModal');
Function approveTrainings
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function approveTrainings () {
hideMenus();
var approveTrees = document.getElementById("approveTrainings");
approveTrees.style.display = "block";
Function refreshAvaliability
has 26 lines of code (exceeds 25 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]);
Function approveTrainings
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function approveTrainings () {
hideAll();
var approveTrees = document.getElementById("approveTrainings");
approveTrees.style.display = "block";
Function approveTrainings
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function approveTrainings () {
hideMenus();
var approveTrees = document.getElementById("approveTrainings");
approveTrees.style.display = "block";
Function checkFirstLogin
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function checkFirstLogin() {
if (data.mainTree != undefined) startLoader();
else {
var modal = document.getElementById('firstLogin');
var btn = document.getElementById('savebtn');
- 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 createSkill
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function createSkill () {
var modal = document.getElementById("newSkillModal");
modal.style.display = "block";
var span = document.getElementById("closeSkillModal");
- 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 editTree
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function editTree () {
$('.clear').find('input:text').val('');
$('.clear').find('textarea').val('');
hideMenus();
- 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 editMySkill
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function editMySkill () {
var modal = document.getElementById("newSkillModal");
modal.style.display = "block";
var span = document.getElementById("closeSkillModal");
- 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 editTree
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function editTree () {
$('.clear').find('input:text').val('');
$('.clear').find('textarea').val('');
hideMenus();
- 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
Avoid deeply nested control flow statements. Open
if (confirm(text)) {
skillsToAdd.push(this.response.skill);
var option = document.createElement("option");
option.text = this.response.skill.name;
skillList.add(option);
Avoid deeply nested control flow statements. Open
if (skillMatrix[component][row + 1] == undefined) skillMatrix[component].push([]);
Avoid deeply nested control flow statements. Open
if (this.skills[i].itemcontainer.skillborder.endorsement != undefined) this.skills[i].itemcontainer.skillborder.endorsement.filters = [colorMatrixFilter];
Avoid deeply nested control flow statements. Open
if (this.skills[j].achievedPoint < minPoint || child.lowAPParents != undefined) {
child.itemcontainer.disable();
if (child.lowAPParents === undefined) {
child.lowAPParents = new Array();
Function getChildren
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function getChildren (skills, skill, children) {
var temp = [];
for (var i = 0; skill.children != undefined && i < skill.children.length; ++i) {
var child = skills.find(obj => obj.name == skill.children[i].name);
- 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
Avoid deeply nested control flow statements. Open
if (this.skills[i].itemcontainer.skillborder.endorsement != undefined) this.skills[i].itemcontainer.skillborder.endorsement.filters = [colorMatrixFilter];
Avoid deeply nested control flow statements. Open
if (this.skills[i].itemcontainer.skillborder.endorsement != undefined) this.skills[i].itemcontainer.skillborder.endorsement.filters = null;