Showing 240 of 537 total issues
Function addSkillToList
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addSkillToList () {
var skill = {value: document.getElementById('skillSearchTree').value};
var skillList = document.getElementById("skillList");
request('POST', '/protected/getskill', skill, function() {
Function 3
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],3:[function(require,module,exports){
/**
* GlowFilter, originally by mishaa
Function addSkillToList
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addSkillToList () {
var skill = {value: document.getElementById('skillSearchTree').value};
var skillList = document.getElementById("skillList");
request('POST', '/protected/getskill', skill, function() {
Function switchSearch
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
function switchSearch(type){
document.getElementById('advSearchDetails').innerHTML = "";
if (type === "Skill") {
document.getElementById('cardSearchBar').onkeyup = function(){
if (Array.from(document.getElementById('skillSearchResult').options).find(obj => obj.value == document.getElementById('cardSearchBar').value) == 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 switchSearch
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
function switchSearch(type){
document.getElementById('advSearchDetails').innerHTML = "";
if (type === "Skill") {
document.getElementById('cardSearchBar').onkeyup = function(){
if (Array.from(document.getElementById('skillSearchResult').options).find(obj => obj.value == document.getElementById('cardSearchBar').value) == 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 constructor
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(app, treeData, treeID, skillID) {
this.app = app;
this.treeData = treeData; // only this tree's data
this.skillData = treeData.skills[skillID];
this.skillData.treeID = treeID;
Function constructor
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(app, treeData, treeID, skillID) {
this.app = app;
this.treeData = treeData; // only this tree's data
this.skillData = treeData.skills[skillID];
this.skillData.treeID = treeID;
Function onclick
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addBtn.onclick = function () {
var skill = {value: document.getElementById('skillSearchTree').value};
request('POST', '/protected/getskill', skill, function() {
if(this.readyState == 4 && this.status == 200) {
Function onclick
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addBtn.onclick = function () {
var skill = {value: document.getElementById('skillSearchTree').value};
request('POST', '/protected/getskill', skill, function() {
if(this.readyState == 4 && this.status == 200) {
Function onclick
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addBtn.onclick = function () {
var skill = {value: document.getElementById('skillSearchTree').value};
request('POST', '/protected/getskill', skill, function() {
if(this.readyState == 4 && this.status == 200) {
Function getPublicUserData
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getPublicUserData(){
var userToSearch = {value: document.getElementById('cardSearchBar').value};
document.getElementById("searchModalTitle").innerHTML = "Click on a user, to view his/her main tree!";
request('POST', '/protected/getPublicUserData', userToSearch, function() {
if(this.readyState == 4 && this.status == 200) {
Function _addRecursive
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Stage.prototype._addRecursive = function (displayObject) {
if (!displayObject.visible) {
return;
}
if (displayObject.isLayer) {
Function _addRecursive
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Stage.prototype._addRecursive = function (displayObject) {
if (!displayObject.visible) {
return;
}
if (displayObject.isLayer) {
Function getPublicUserData
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getPublicUserData(){
var userToSearch = {value: document.getElementById('cardSearchBar').value};
document.getElementById("searchModalTitle").innerHTML = "Click on a user, to view his/her main tree!";
request('POST', '/protected/getPublicUserData', userToSearch, function() {
if(this.readyState == 4 && this.status == 200) {
Function onclick
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
row.onclick = function(){
var foundmodal = document.getElementById('searchedSkillModal');
var header = document.getElementById('searchedSkillModalHeader');
var category = document.getElementById('searchedSkillModalCategory');
var pdesc = document.getElementById('searchedSkillModalPDesc');
Function onclick
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
row.onclick = function(){
var searchedUserModal = document.getElementById('searchedUserModal');
var closeSearchedUserModal = document.getElementById('closeSearchedUserModal');
var searchedUserModalHeader = document.getElementById('searchedUserModalHeader');
var searchedUserlModalInfo = document.getElementById('searchedUserlModalInfo');
Function 2
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],2:[function(require,module,exports){
/**
* ColorReplaceFilter, originally by mishaa, updated by timetocode
Function 2
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],2:[function(require,module,exports){
/**
* ColorReplaceFilter, originally by mishaa, updated by timetocode
Function approveSkills
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function approveSkills() {
hideMenus();
var approveSkills = document.getElementById("approveSkills");
Function approveSkills
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function approveSkills() {
hideAll();
var approveSkills = document.getElementById("approveSkills");