juanmard/icestudio

View on GitHub

Showing 203 of 447 total issues

Avoid deeply nested control flow statements.
Open

              if (vw.source.block === lin.id) {
                if (typeof vwiresLut[lin.data.name] === 'undefined') {
                  vwiresLut[lin.data.name] = {
                    source: [],
                    target: [],
Severity: Major
Found in services/compiler.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if (connectedLink.get('target').port === item.id) {
                          connected = true;
                          return false;
                        }
    Severity: Major
    Found in services/graph.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                        for (var opin = 0; opin < opt.designPinout.length; opin++) {
                          if (
                            String(opt.designPinout[opin].name) ===
                            String(pins[i].name)
                          ) {
      Severity: Major
      Found in services/graph.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                      if (block.type !== 'basic.code') {
                        paramName = utils.digestId(paramName);
                      }
        Severity: Major
        Found in services/compiler.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                            if (port.name === target.port && port.default) {
                              port.default.apply = value;
                              break;
                            }
          Severity: Major
          Found in services/graph.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                          for (i in blocks) {
                            block = blocks[i];
                            if (
                              block.type === 'basic.input' &&
                              !block.data.range &&
            Severity: Major
            Found in services/compiler.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                            if (!found) {
                              // Add imaginary input block with the initPort value
                              project.design.graph.blocks.push({
                                id: initPort.name,
                                type: 'basic.input',
              Severity: Major
              Found in services/compiler.js - About 45 mins to fix

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

                      function _navigateProject(update, prj, submodule, submoduleId, editMode) {
                Severity: Minor
                Found in controllers/design.js - About 35 mins to fix

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

                        function _addBlockFile(self, orig, name, data, notify) {
                  Severity: Minor
                  Found in services/project.js - About 35 mins to fix

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

                      adjustSelection: function (evt) {
                        'use strict';
                    
                        var dx;
                        var dy;
                    Severity: Minor
                    Found in graphics/joint.selection.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 mouseManager has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      mouseManager: function (evt, fnc) {
                        'use strict';
                    
                        evt.preventDefault();
                    
                    
                    Severity: Minor
                    Found in graphics/joint.selection.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 initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      initialize: function () {
                        'use strict';
                    
                        _.bindAll(this, 'updateBox');
                        joint.dia.ElementView.prototype.initialize.apply(this, arguments);
                    Severity: Minor
                    Found in graphics/joint.shapes.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 createSelectionBox has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      createSelectionBox: function (element, opt) {
                        'use strict';
                    
                        opt = opt || {};
                    
                    
                    Severity: Minor
                    Found in graphics/joint.selection.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

                    Avoid too many return statements within this function.
                    Open

                          return push(command);
                    Severity: Major
                    Found in graphics/joint.command.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return push(command);
                      Severity: Major
                      Found in graphics/joint.command.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return push(command);
                        Severity: Major
                        Found in graphics/joint.command.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return false;
                          Severity: Major
                          Found in services/graph.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                          return ret;
                            Severity: Major
                            Found in services/graph.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                        return lowerBlock;
                              Severity: Major
                              Found in services/graph.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                return false;
                                Severity: Major
                                Found in services/graph.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language