Showing 537 of 537 total issues
Function createSkill
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createSkill () {
//$('#newSkillForm').reset();
document.getElementById('newSkillForm').reset();
var modal = document.getElementById("newSkillModal");
Function createSkill
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createSkill () {
//$('#newSkillForm').reset();
document.getElementById('newSkillForm').reset();
var modal = document.getElementById("newSkillModal");
Function deleteSkillFromList
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function deleteSkillFromList () {
var skillList = document.getElementById("skillList");
var children = [];
getChildren(skillsToAdd, skillsToAdd.find(obj => obj.name == skillList.options[skillList.selectedIndex].text), children);
- 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 deleteSkillFromList
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function deleteSkillFromList () {
var skillList = document.getElementById("skillList");
var children = [];
getChildren(skillsToAdd, skillsToAdd.find(obj => obj.name == skillList.options[skillList.selectedIndex].text), children);
- 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 _displayProcessInteractive
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
_displayProcessInteractive: function (point, displayObject, hitTestOrder, interactive, outOfMask) {
if (!displayObject || !displayObject.visible) {
return 0;
}
var hit = 0, interactiveParent = interactive = displayObject.interactive || interactive;
Function _displayProcessInteractive
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
_displayProcessInteractive: function (point, displayObject, hitTestOrder, interactive, outOfMask) {
if (!displayObject || !displayObject.visible) {
return 0;
}
var hit = 0, interactiveParent = interactive = displayObject.interactive || interactive;
Function editMyTree
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function editMyTree () {
$('.clear').find('input:text').val('');
$('.clear').find('textarea').val('');
var skillList = document.getElementById("skillList");
skillList.innerHTML = "";
- 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 editMyTree
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function editMyTree () {
$('.clear').find('input:text').val('');
$('.clear').find('textarea').val('');
var skillList = document.getElementById("skillList");
skillList.innerHTML = "";
- 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 toggleSkillInfoPage
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
toggleSkillInfoPage () {
var modal = document.getElementById('skillinfopage');
var header = document.getElementById('infoSkillnameHeader');
var span = document.getElementById("closeInfoModal");
var desc = document.getElementById("imDesc");
Function editMyTree
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editMyTree () {
$('.clear').find('input:text').val('');
$('.clear').find('textarea').val('');
var skillList = document.getElementById("skillList");
skillList.innerHTML = "";
Function getPublicUserData
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPublicUserData(){
var userToSearch = {value: document.getElementById('cardSearchBar').value};
request('POST', '/protected/getPublicUserData', userToSearch, function() {
if(this.readyState == 4 && this.status == 200) {
var modal = document.getElementById('searchModal');
Function editMyTree
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editMyTree () {
$('.clear').find('input:text').val('');
$('.clear').find('textarea').val('');
var skillList = document.getElementById("skillList");
skillList.innerHTML = "";
Function toggleSkillInfoPage
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
toggleSkillInfoPage () {
var modal = document.getElementById('skillinfopage');
var header = document.getElementById('infoSkillnameHeader');
var span = document.getElementById("closeInfoModal");
var desc = document.getElementById("imDesc");
Function toggleSkillInfoPage
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
toggleSkillInfoPage () {
var modal = document.getElementById('skillinfopage');
var header = document.getElementById('infoSkillnameHeader');
var span = document.getElementById("closeInfoModal");
var desc = document.getElementById("imDesc");
Function constructor
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
constructor(app, skills, skillName, owner) {
this.app = app;
this.skills = skills;
this.skill = skills.find(obj => obj.name == skillName);
this.self = owner.self;
- 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 onDragMove
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
onDragMove(event) {
var obj = event.currentTarget;
if (!obj.dragging) return;
var data = obj.dragData;
if (obj.dragging == 1) {
- 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 onDragMove
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
onDragMove(event) {
var obj = event.currentTarget;
if (!obj.dragging) return;
var data = obj.dragData;
if (obj.dragging == 1) {
- 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 constructor
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
constructor(app, skills, skillName, owner) {
this.app = app;
this.skills = skills;
this.skill = skills.find(obj => obj.name == skillName);
this.self = owner.self;
- 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 addTraining
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addTraining () {
var modal = document.getElementById("addTrainingModal");
modal.style.display = "block";
var span = document.getElementById("closeTrainingModal");
Function onclick
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
save.onclick = function () {
var pointsTable = document.getElementById('pointsTable');
var pointsNum = pointsTable.rows.length - 1;
var pointDescription = [];
for (i = 1; i < pointsNum + 1; ++i) pointDescription.push(pointsTable.rows[i].cells[1].children[0].value);