sicambria/skilltree

View on GitHub

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++) {
Severity: Minor
Found in new design/draft_create_skill_modal_design/user/pixi/pixi-layers.js - About 1 hr to fix

    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]);
    Severity: Minor
    Found in new design/draft_offers_modal_design/user/classes/itemcontainer.js - About 1 hr to fix

      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++) {
      Severity: Minor
      Found in new design/draft_offers_modal_design/user/pixi/pixi-layers.js - About 1 hr to fix

        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');
        Severity: Minor
        Found in new design/draft_create_skill_modal_design/user/src/search.js - About 1 hr to fix

          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";
          Severity: Minor
          Found in public/user/chartandtree.js - About 1 hr to fix

            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";
              Severity: Minor
              Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

                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";
                Severity: Minor
                Found in new design/draft_offers_modal_design/user/chartandtree.js - About 1 hr to fix

                  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');
                  Severity: Minor
                  Found in new design/draft_create_skill_modal_design/user/src/init.js - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function createSkill () {
                      var modal = document.getElementById("newSkillModal");
                      modal.style.display = "block";
                  
                      var span = document.getElementById("closeSkillModal");
                  Severity: Minor
                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 55 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 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();
                  
                  
                  Severity: Minor
                  Found in public/user/chartandtree.js - About 55 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 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");
                  Severity: Minor
                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 55 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 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();
                  
                  
                  Severity: Minor
                  Found in new design/draft_offers_modal_design/user/chartandtree.js - About 55 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

                  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);
                  Severity: Major
                  Found in public/user/chartandtree.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if (skillMatrix[component][row + 1] == undefined) skillMatrix[component].push([]);
                    Severity: Major
                    Found in app.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if (this.skills[i].itemcontainer.skillborder.endorsement != undefined) this.skills[i].itemcontainer.skillborder.endorsement.filters = [colorMatrixFilter];
                      Severity: Major
                      Found in new design/draft_create_skill_modal_design/user/classes/itemcontainer.js - About 45 mins to fix

                        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();
                        Severity: Major
                        Found in new design/draft_create_skill_modal_design/user/classes/tree.js - About 45 mins to fix

                          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);
                          
                          
                          Severity: Minor
                          Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 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

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (this.skills[i].itemcontainer.skillborder.endorsement != undefined) this.skills[i].itemcontainer.skillborder.endorsement.filters = [colorMatrixFilter];
                          Severity: Major
                          Found in public/user/classes/itemcontainer.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if (this.skills[i].itemcontainer.skillborder.endorsement != undefined) this.skills[i].itemcontainer.skillborder.endorsement.filters = null;
                            Severity: Major
                            Found in public/user/classes/itemcontainer.js - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language