sicambria/skilltree

View on GitHub

Showing 240 of 537 total issues

File app.js has 1401 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const fs = require('fs');
const http = require('http');
const path = require('path');
const express = require('express');
const bodyParser  = require('body-parser');
Severity: Major
Found in app.js - About 3 days to fix

    File chartandtree.js has 968 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var data = undefined;
    var change = false;
    
    // creates the pixi app
    var app = new PIXI.Application({
    Severity: Major
    Found in public/user/chartandtree.js - About 2 days to fix

      File chartandtree.js has 904 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      var data = undefined;
      var change = false;
      initData();
      
      // creates the pixi app
      Severity: Major
      Found in new design/draft_offers_modal_design/user/chartandtree.js - About 2 days to fix

        File chartandtree.js has 868 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        var data = undefined;
        initData();
        
        // creates the pixi app
        var app = new PIXI.Application({
        Severity: Major
        Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 2 days to fix

          File pixi-layers.js has 725 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          var pixi_display;
          (function (pixi_display) {
              Object.assign(PIXI.Container.prototype, {
                  renderWebGL: function (renderer) {
                      if (this._activeParentLayer && this._activeParentLayer != renderer._activeLayer) {
          Severity: Major
          Found in new design/draft_create_skill_modal_design/user/pixi/pixi-layers.js - About 1 day to fix

            File pixi-layers.js has 725 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var pixi_display;
            (function (pixi_display) {
                Object.assign(PIXI.Container.prototype, {
                    renderWebGL: function (renderer) {
                        if (this._activeParentLayer && this._activeParentLayer != renderer._activeLayer) {
            Severity: Major
            Found in new design/draft_offers_modal_design/user/pixi/pixi-layers.js - About 1 day to fix

              Function toggleSkillDetailsPage has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
              Open

                  toggleSkillDetailsPage(){
                      var modal = document.getElementById('skillpage');
                      var header = document.getElementById('skillnameHeader');
                      var span = document.getElementById("closeORModal");
                      var globalskill = 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 toggleSkillDetailsPage has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
              Open

                  toggleSkillDetailsPage(){
                      var modal = document.getElementById('skillpage');
                      var header = document.getElementById('skillnameHeader');
                      var span = document.getElementById("closeORModal");
                      var globalskill = undefined;
              Severity: Minor
              Found in new design/draft_offers_modal_design/user/classes/itemcontainer.js - About 1 day 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

              File itemcontainer.js has 576 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

                // a quick note on filters: filters will have 2 element, the 0th element is
                // reserved for hover animations, the 1st element is reserved for more permanent
                // effect, eg. green glowfilters for maxed out skills. Keep in mind that .filters
                // should NEVER be nulled, only modified. If you want to empty a slot, apply
                // nullFilter there, it does nothing, it's kind of a placeholder filter.
              Severity: Major
              Found in public/user/classes/itemcontainer.js - About 1 day to fix

                File itemcontainer.js has 553 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                  // a quick note on filters: filters will have 2 element, the 0th element is
                  // reserved for hover animations, the 1st element is reserved for more permanent
                  // effect, eg. green glowfilters for maxed out skills. Keep in mind that .filters
                  // should NEVER be nulled, only modified. If you want to empty a slot, apply
                  // nullFilter there, it does nothing, it's kind of a placeholder filter.
                Severity: Major
                Found in new design/draft_offers_modal_design/user/classes/itemcontainer.js - About 1 day to fix

                  Function toggleSkillDetailsPage has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                  Open

                      toggleSkillDetailsPage(){
                          var modal = document.getElementById('skillpage');
                          var header = document.getElementById('skillnameHeader');
                          var span = document.getElementById("closeORModal");
                          var globalskill = undefined;
                  Severity: Minor
                  Found in public/user/classes/itemcontainer.js - About 1 day 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

                  File itemcontainer.js has 540 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  class ItemContainer {
                      constructor(app, skills, skillName, owner) {
                          this.app = app;
                          this.skills = skills;
                          this.skill = skills.find(obj => obj.name == skillName);

                    Function constructor has 191 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        constructor(app, skills, skillName, owner) {
                            this.app = app;
                            this.skills = skills;
                            this.skill = skills.find(obj => obj.name == skillName);
                            this.self = owner.self;
                    Severity: Major
                    Found in public/user/classes/itemcontainer.js - About 7 hrs to fix

                      Function constructor has 177 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          constructor(app, skills, skillName, owner) {
                              this.app = app;
                              this.skills = skills;
                              this.skill = skills.find(obj => obj.name == skillName);
                              this.self = owner.self;

                        Function constructor has 177 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            constructor(app, skills, skillName, owner) {
                                this.app = app;
                                this.skills = skills;
                                this.skill = skills.find(obj => obj.name == skillName);
                                this.self = owner.self;
                        Severity: Major
                        Found in new design/draft_offers_modal_design/user/classes/itemcontainer.js - About 7 hrs to fix

                          Function toggleSkillDetailsPage has 173 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 toggleSkillDetailsPage has 173 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;
                            Severity: Major
                            Found in new design/draft_offers_modal_design/user/classes/itemcontainer.js - About 6 hrs to fix

                              Function Layer has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  var Layer = (function (_super) {
                                      __extends(Layer, _super);
                                      function Layer(group) {
                                          if (group === void 0) { group = null; }
                                          var _this = _super.call(this) || this;
                              Severity: Major
                              Found in new design/draft_create_skill_modal_design/user/pixi/pixi-layers.js - About 6 hrs to fix

                                Function Layer has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    var Layer = (function (_super) {
                                        __extends(Layer, _super);
                                        function Layer(group) {
                                            if (group === void 0) { group = null; }
                                            var _this = _super.call(this) || this;
                                Severity: Major
                                Found in new design/draft_offers_modal_design/user/pixi/pixi-layers.js - About 6 hrs to fix

                                  Function editMySkill has 149 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function editMySkill () {
                                      var modal = document.getElementById("newSkillModal");
                                      modal.style.display = "block";
                                  
                                      var span = document.getElementById("closeSkillModal");
                                  Severity: Major
                                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 5 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language