sicambria/skilltree

View on GitHub

Showing 240 of 537 total issues

Function GlowFilter has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function GlowFilter(distance, outerStrength, innerStrength, color, quality) {
Severity: Minor
Found in new design/draft_offers_modal_design/user/pixi/pixi-extra-filters.js - About 35 mins to fix

    Function processInteractive has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            processInteractive: function (strangeStuff, displayObject, func, hitTest, interactive) {
    Severity: Minor
    Found in new design/draft_offers_modal_design/user/pixi/pixi-layers.js - About 35 mins to fix

      Function render has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              render: function (displayObject, renderTexture, clear, transform, skipUpdateTransform) {
      Severity: Minor
      Found in new design/draft_offers_modal_design/user/pixi/pixi-layers.js - About 35 mins to fix

        Function constructor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            constructor (app, skills, owner) {
                this.skills = skills;
                this.treeContainer = new PIXI.Container();
                this.treeContainer.enableSort = true;
                this.treeContainer.interactive = true;
        Severity: Minor
        Found in public/user/classes/tree.js - About 35 mins to fix

        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 validate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function validate() {
            var loginBox = document.getElementById("loginBox");
            var username = document.getElementById("username");
            var password = document.getElementById("password");
        
        
        Severity: Minor
        Found in public/login.js - About 35 mins to fix

        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 7 (exceeds 5 allowed). Consider refactoring.
        Open

            constructor (app, skills, owner) {
                this.skills = skills;
                this.treeContainer = new PIXI.Container();
                this.treeContainer.enableSort = true;
                this.treeContainer.interactive = true;
        Severity: Minor
        Found in new design/draft_create_skill_modal_design/user/classes/tree.js - About 35 mins to fix

        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 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function createSkill () {
            //$('#newSkillForm').reset();
            document.getElementById('newSkillForm').reset();
        
            var modal = document.getElementById("newSkillModal");
        Severity: Minor
        Found in public/user/chartandtree.js - About 35 mins to fix

        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 7 (exceeds 5 allowed). Consider refactoring.
        Open

            constructor (app, skills, owner) {
                this.skills = skills;
                this.treeContainer = new PIXI.Container();
                this.treeContainer.enableSort = true;
                this.treeContainer.interactive = true;
        Severity: Minor
        Found in new design/draft_offers_modal_design/user/classes/tree.js - About 35 mins to fix

        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 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function createSkill () {
            //$('#newSkillForm').reset();
            document.getElementById('newSkillForm').reset();
        
            var modal = document.getElementById("newSkillModal");
        Severity: Minor
        Found in new design/draft_offers_modal_design/user/chartandtree.js - About 35 mins to fix

        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 getDependency has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        async function getDependency (userSkills, skill, dependency) {
            var parents = [];
            for (var i = 0; skill.parents != undefined && i < skill.parents.length; ++i) {
                var parent = userSkills.find(obj => obj.name == skill.parents[i]);
                if (parent == undefined) {
        Severity: Minor
        Found in app.js - About 25 mins to fix

        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 initData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        function initData(){
          var dataRequest = new XMLHttpRequest();
          dataRequest.open('GET', '/protected/userdata', true);
          dataRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
          dataRequest.setRequestHeader('x-access-token', localStorage.getItem("loginToken"));
        Severity: Minor
        Found in new design/draft_create_skill_modal_design/user/src/init.js - About 25 mins to fix

        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 initData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        function initData(){
          var dataRequest = new XMLHttpRequest();
          dataRequest.open('GET', '/protected/userdata', true);
          dataRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
          dataRequest.setRequestHeader('x-access-token', localStorage.getItem("loginToken"));
        Severity: Minor
        Found in public/user/src/init.js - About 25 mins to fix

        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 assembleTree has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        async function assembleTree(skillMatrix){
            var assembledTree = [];
            var l = true;
            var j = 0;
            while (l) {
        Severity: Minor
        Found in app.js - About 25 mins to fix

        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 loadAddedTrees has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        function loadAddedTrees(){
          var treeList = document.getElementById('treeList');
          treeList.innerHTML = "";
          for (var i = 0; i < data.trees.length; i++) {
            var tn = data.trees[i].name;
        Severity: Minor
        Found in public/user/src/init.js - About 25 mins to fix

        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 6 (exceeds 5 allowed). Consider refactoring.
        Open

            drawConnectionLines() {
                var connectionGroup = new PIXI.display.Group(-1, false);
        
                for (var j = 0; j < this.treeData.skills.length; ++j) {
                    if (this.treeData.skills[j].children !== undefined) {

        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 validateNewPwd has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        function validateNewPwd() {
            var oldPassword = document.getElementById("curPassword");
            var password1 = document.getElementById("newPassword1");
            var password2 = document.getElementById("newPassword2");
        
        
        Severity: Minor
        Found in public/user/chartandtree.js - About 25 mins to fix

        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 checkFirstLogin has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        function checkFirstLogin() {
            if (data.mainTree != undefined) startLoader();
            else {
                var modal = document.getElementById('firstLogin');
                var btn = document.getElementById('savebtn');
        Severity: Minor
        Found in new design/draft_offers_modal_design/user/src/init.js - About 25 mins to fix

        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 initData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        function initData(){
          var dataRequest = new XMLHttpRequest();
          dataRequest.open('GET', '/protected/userdata', true);
          dataRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
          dataRequest.setRequestHeader('x-access-token', localStorage.getItem("loginToken"));
        Severity: Minor
        Found in new design/draft_offers_modal_design/user/src/init.js - About 25 mins to fix

        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 6 (exceeds 5 allowed). Consider refactoring.
        Open

            drawConnectionLines() {
                var connectionGroup = new PIXI.display.Group(-1, false);
        
                for (var j = 0; j < this.treeData.skills.length; ++j) {
                    if (this.treeData.skills[j].children !== undefined) {
        Severity: Minor
        Found in new design/draft_offers_modal_design/user/editor/classes/editortree.js - About 25 mins to fix

        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 onClick has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            onClick(event) {
                if (!event.drag) {
                    if (this.parentObj.self) {
                        var children = this.parentObj.skill.children;
        
        
        Severity: Minor
        Found in new design/draft_offers_modal_design/user/classes/itemcontainer.js - About 25 mins to fix

        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

        Severity
        Category
        Status
        Source
        Language