sicambria/skilltree

View on GitHub

Showing 537 of 537 total issues

Avoid deeply nested control flow statements.
Open

                        for (var i = 0; i < this.response.dependency.length; ++i) {
                            text += this.response.dependency[i].name + "\n";
                        }
Severity: Major
Found in public/user/chartandtree.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                for (var i = 0; i < this.response.dependency.length; ++i) {
                                    text += this.response.dependency[i].name + "\n";
                                }
    Severity: Major
    Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

      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 new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    for (var i = 0; i < this.response.dependency.length; ++i) {
                                        text += this.response.dependency[i].name + "\n";
                                    }
        Severity: Major
        Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (skillList.options[j].text == children[i].name) skillList.remove(j);
          Severity: Major
          Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if (displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y)) {
                                            hit = displayObject.displayOrder;
                                        }
            Severity: Major
            Found in new design/draft_offers_modal_design/user/pixi/pixi-layers.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      for (var i = 0; i < this.response.dependency.length; ++i) {
                                          text += this.response.dependency[i].name + "\n";
                                      }
              Severity: Major
              Found in new design/draft_offers_modal_design/user/chartandtree.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if (skillList.options[j].text == children[i].name) skillList.remove(j);
                Severity: Major
                Found in new design/draft_offers_modal_design/user/chartandtree.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              for (var i = 0; i < this.response.dependency.length; ++i) {
                                                  text += this.response.dependency[i].name + "\n";
                                              }
                  Severity: Major
                  Found in new design/draft_create_skill_modal_design/user/chartandtree.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_offers_modal_design/user/classes/itemcontainer.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              else if (displayObject.containsPoint) {
                                                  if (displayObject.containsPoint(point)) {
                                                      hit = displayObject.displayOrder;
                                                  }
                                              }
                      Severity: Major
                      Found in new design/draft_offers_modal_design/user/pixi/pixi-layers.js - About 45 mins to fix

                        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 new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                          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 new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if (skillList.options[j].text == children[i].name) skillList.remove(j);
                            Severity: Major
                            Found in new design/draft_create_skill_modal_design/user/chartandtree.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_offers_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 (skillList.options[j].text == children[i].name) skillList.remove(j);
                              Severity: Major
                              Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                Function createTableRow has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        function createTableRow( data1, data2, data3, data4, data5, classname )
                                Severity: Minor
                                Found in new design/draft_offers_modal_design/user/classes/itemcontainer.js - About 45 mins to fix

                                  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 new design/draft_offers_modal_design/user/chartandtree.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 new design/draft_offers_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_offers_modal_design/user/classes/tree.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language