Showing 240 of 537 total issues
Function editMyTree
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
function editMyTree () {
hideAll();
var treeName = document.getElementById("treeName");
treeName.setAttribute('list', 'TreeSearchResult');
- 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 toggleSkillDetailsPage
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
toggleSkillDetailsPage(){
var modal = document.getElementById('skillpage');
var header = document.getElementById('skillnameHeader');
var span = document.getElementById("closeORModal");
var globalskill = undefined;
Function editTree
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function editTree () {
hideAll();
var treeName = document.getElementById("treeName");
treeName.setAttribute('list', 'TreeSearchResult');
- 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 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editTree () {
hideAll();
var treeName = document.getElementById("treeName");
treeName.setAttribute('list', 'TreeSearchResult');
Function insertSkill
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
async function insertSkill(skillToInsert, skillMatrix) {
for (var component = 0; component < skillMatrix.length; component++) {
for (var child = 0; child < skillToInsert.children.length; child++) {
for (var row = 0; row < skillMatrix[component].length; row++) {
if ((skillMatrix[component][row].map(obj => obj.name)).includes(skillToInsert.children[child].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
Function editMyTree
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editMyTree () {
hideAll();
var treeName = document.getElementById("treeName");
treeName.setAttribute('list', 'TreeSearchResult');
Function Group
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Group = (function (_super) {
__extends(Group, _super);
function Group(zIndex, sorting) {
var _this = _super.call(this) || this;
_this._activeLayer = null;
Function Group
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Group = (function (_super) {
__extends(Group, _super);
function Group(zIndex, sorting) {
var _this = _super.call(this) || this;
_this._activeLayer = null;
Function createTree
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function createTree () {
hideAll();
var treeName = document.getElementById("treeName");
treeName.setAttribute('list', '');
- 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 onreadystatechange
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
offerHttpRequest.onreadystatechange = function() {
if(offerHttpRequest.readyState == 4 && offerHttpRequest.status == 200) {
if (offerHttpRequest.response !== undefined) {
//Got the offer data, fill the offers table
Function onreadystatechange
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
offerHttpRequest.onreadystatechange = function() {
if(offerHttpRequest.readyState == 4 && offerHttpRequest.status == 200) {
if (offerHttpRequest.response !== undefined) {
//Got the offer data, fill the offers table
Function onreadystatechange
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
offerHttpRequest.onreadystatechange = function() {
if(offerHttpRequest.readyState == 4 && offerHttpRequest.status == 200) {
if (offerHttpRequest.response !== undefined) {
//Got the offer data, fill the offers table
Function Stage
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Stage = (function (_super) {
__extends(Stage, _super);
function Stage() {
var _this = _super.call(this) || this;
_this.isStage = true;
Function Stage
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Stage = (function (_super) {
__extends(Stage, _super);
function Stage() {
var _this = _super.call(this) || this;
_this.isStage = true;
Function createTree
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createTree () {
hideAll();
var treeName = document.getElementById("treeName");
treeName.setAttribute('list', '');
Function editSkill
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editSkill () {
document.getElementById('newSkillForm').reset();
var modal = document.getElementById("newSkillModal");
modal.style.display = "block";
Function editSkill
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editSkill () {
document.getElementById('newSkillForm').reset();
var modal = document.getElementById("newSkillModal");
modal.style.display = "block";
Function editMySkill
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editMySkill () {
document.getElementById('newSkillForm').reset();
var modal = document.getElementById("newSkillModal");
modal.style.display = "block";
Function editMySkill
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editMySkill () {
document.getElementById('newSkillForm').reset();
var modal = document.getElementById("newSkillModal");
modal.style.display = "block";
Function onClick
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
onClick(event) {
if (!event.drag) {
if (this.parentObj.self) {
var children = this.parentObj.skill.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"