juanmard/icestudio

View on GitHub

Showing 203 of 447 total issues

Function getContent has 172 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function getContent(name, project) {
      var i, j, w;
      var content = [];
      var graph = project.design.graph;
      var connections = {
Severity: Major
Found in services/compiler.js - About 6 hrs to fix

    Function graphToCells has 161 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function graphToCells(_graph, opt) {
            // Options:
            // - new: assign a new id to all the cells
            // - reset: clear I/O blocks values
            // - disabled: set disabled flag to the blocks
    Severity: Major
    Found in services/graph.js - About 6 hrs to fix

      Function updateBox has 141 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        updateBox: function () {
          'use strict';
      
          var pendingTasks = [];
          var i, port;
      Severity: Major
      Found in graphics/joint.shapes.js - About 5 hrs to fix

        File joint.routers.js has 400 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* eslint-disable new-cap */
        
        joint.routers.ice = (function (g, _, joint) {
          'use strict';
        
        
        Severity: Minor
        Found in graphics/joint.routers.js - About 5 hrs to fix

          Function iceRok has 128 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          let iceRok = function (port) {
            this.tcps = {
              port: 9999,
              connected: false,
              server: false,
          Severity: Major
          Found in plugins/icerok/js/iceRok.js - About 5 hrs to fix

            Function _setProjectInformation has 126 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  function _setProjectInformation() {
                    var values = getProjectInformation();
            
                    var i;
                    var content = [];
            Severity: Major
            Found in controllers/menu.js - About 5 hrs to fix

              Function iceRok has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
              Open

              let iceRok = function (port) {
                this.tcps = {
                  port: 9999,
                  connected: false,
                  server: false,
              Severity: Minor
              Found in plugins/icerok/js/iceRok.js - About 4 hrs 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 updateBox has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
              Open

                updateBox: function () {
                  'use strict';
              
                  var pendingTasks = [];
                  var i, j, port;
              Severity: Minor
              Found in graphics/joint.shapes.js - About 4 hrs 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 verilogCompiler has 113 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function verilogCompiler(name, project, opt) {
                    var i,
                      data,
                      block,
                      code = '';
              Severity: Major
              Found in services/compiler.js - About 4 hrs to fix

                File joint.selection.js has 342 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                Copyright (c) 2016-2019 FPGAwars
                Copyright (c) 2013 client IO
                */
                
                
                Severity: Minor
                Found in graphics/joint.selection.js - About 4 hrs to fix

                  Function serialManager has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var serialManager = function () {
                    this.devices = [];
                    this.info = {
                      status: false,
                      dev: -1,
                  Severity: Major
                  Found in plugins/serial-term/js/main.js - About 4 hrs to fix

                    Function editBasicOutputLabel has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function editBasicOutputLabel(cellView, callback) {
                          var graph = cellView.paper.model;
                          var block = cellView.model.attributes;
                          var formSpecs = [
                            {
                    Severity: Major
                    Found in services/blocks.js - About 4 hrs to fix

                      Function editBasicInput has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function editBasicInput(cellView, callback) {
                            var graph = cellView.paper.model;
                            var block = cellView.model.attributes;
                            var formSpecs = [
                              {
                      Severity: Major
                      Found in services/blocks.js - About 4 hrs to fix

                        File preferences.js has 334 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        // Please note that $uibModalInstance represents a modal window (instance) dependency.
                        // It is not the same as the $uibModal service.
                        
                        /* eslint-disable camelcase */
                        
                        
                        Severity: Minor
                        Found in controllers/preferences.js - About 4 hrs to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if (
                                    event.keyCode === command.key &&
                                    event.altKey === (command.alt || false) &&
                                    event.ctrlKey === (command.ctrl || false) &&
                                    event.metaKey === (command.meta || false) &&
                          Severity: Critical
                          Found in services/shortcuts.js - About 4 hrs to fix

                            Function updateBifurcations has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              updateBifurcations: function () {
                                'use strict';
                            
                                if (this._V.markerBifurcations) {
                                  var self = this;
                            Severity: Major
                            Found in graphics/joint.shapes.js - About 4 hrs to fix

                              Function findRoute has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function findRoute(start, end, map, opt) {
                                  var step = opt.step;
                                  var startPoints, endPoints;
                                  var startCenter, endCenter;
                              
                              
                              Severity: Major
                              Found in graphics/joint.routers.js - About 3 hrs to fix

                                Function addCommand has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  addCommand: function (cmdName, cell, graph, options) {
                                    'use strict';
                                
                                    if (cmdName === 'change:labels' || cmdName === 'change:z') {
                                      return;
                                Severity: Minor
                                Found in graphics/joint.command.js - About 3 hrs 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 initialize has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  initialize: function () {
                                    'use strict';
                                
                                    _.bindAll(this, 'updateBox');
                                    joint.dia.ElementView.prototype.initialize.apply(this, arguments);
                                Severity: Major
                                Found in graphics/joint.shapes.js - About 3 hrs to fix

                                  Function validateConnection has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                            validateConnection: function (
                                              cellViewS,
                                              magnetS,
                                              cellViewT,
                                              magnetT,
                                  Severity: Major
                                  Found in services/graph.js - About 3 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language