neyric/wireit

View on GitHub

Showing 179 of 497 total issues

Function getMap has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    getMap: function(group)
    {
        
        //assume no group container case
        if (Y.Lang.isValue(group.groupContainer))
Severity: Minor
Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

    Function generateTerminals has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        generateTerminals: function(terminalConfigs, overrides, external, usedNames)
        {
            var terminals = [];
            var visibleTerminals = [];
            for (var mI in terminalConfigs)
    Severity: Minor
    Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

      Function LocalStorageSync has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

      function LocalStorageSync(key) {
          var localStorage;
      
          if (!key) {
              Y.error('No storage key specified.');
      Severity: Minor
      Found in src/wireit-app/js/local-storage-sync.js - About 1 hr 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 mayEval has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

         mayEval: function(moduleId) {
            var t = this.wiringConfig.working.modules[moduleId].name;
      
            //console.log("mayEval", this.wiringConfig.working.modules[moduleId]);
      
      
      Severity: Minor
      Found in sandbox/jsBox/ExecutionFrame.js - About 1 hr 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 xpathGrammarPrecedence has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

      function xpathGrammarPrecedence(frame) {
        var ret = 0;
      
        if (frame.rule) { /* normal reduce */
          if (frame.rule.length >= 3 && frame.rule[2] >= 0) {
      Severity: Minor
      Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 1 hr 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 mayEval has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

         mayEval: function(moduleId) {
            var t = this.wiringConfig.working.modules[moduleId].name;
      
            //console.log("mayEval", this.wiringConfig.working.modules[moduleId]);
      
      
      Severity: Minor
      Found in sandbox/grouping/examples/sawire/ExecutionFrame.js - About 1 hr 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 xsltCopyOf has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

      function xsltCopyOf(dst, src, dstDocument) {
        if (src.nodeType == DOM_DOCUMENT_FRAGMENT_NODE ||
            src.nodeType == DOM_DOCUMENT_NODE) {
          for (var i = 0; i < src.childNodes.length; ++i) {
            arguments.callee(dst, src.childNodes[i], dstDocument);
      Severity: Minor
      Found in sandbox/grouping/examples/sawire/xml/xslt.js - About 1 hr 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 xmlResolveEntities has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function xmlResolveEntities(s) {
      
        var parts = stringSplit(s, '&');
      
        var ret = parts[0];
      Severity: Minor
      Found in sandbox/grouping/examples/sawire/xml/dom.js - About 1 hr to fix

        Function workOutCenter has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            workOutCenter: function(group)
            {
                var bounds = {};
                
                var setBound = function(position)
        Severity: Minor
        Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

          Function domTraverseElements has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

          function domTraverseElements(node, opt_pre, opt_post) {
            var ret;
            if (opt_pre) {
              ret = opt_pre.call(null, node);
              if (typeof ret == 'boolean' && !ret) {
          Severity: Minor
          Found in sandbox/grouping/examples/sawire/xml/dom.js - About 1 hr 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 xsltMatch has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

          function xsltMatch(match, context) {
            var expr = xpathParse(match);
          
            var ret;
            // Shortcut for the most common case.
          Severity: Minor
          Found in sandbox/grouping/examples/sawire/xml/xslt.js - About 1 hr 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 insertBefore has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

          XNode.prototype.insertBefore = function(newNode, oldNode) {
            if (oldNode == newNode) {
              return;
            }
          
          
          Severity: Minor
          Found in sandbox/grouping/examples/sawire/xml/dom.js - About 1 hr 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 getExternalToInternalMap has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              getExternalToInternalMap: function(map)
              {
                  var containerMap = {"fields" : {}, "terminals" : {}};
                  var groupMap = {"fields" : {}, "terminals" : {}};
                          
          Severity: Minor
          Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

            Function xmlTextR has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function xmlTextR(node, buf, cdata) {
              if (node.nodeType == DOM_TEXT_NODE) {
                buf.push(xmlEscapeText(node.nodeValue));
            
              } else if (node.nodeType == DOM_CDATA_SECTION_NODE) {
            Severity: Minor
            Found in sandbox/grouping/examples/sawire/xml/util.js - About 1 hr to fix

              Function addWiresForContainer has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      var addWiresForContainer = function(c, getExternalName)
                          {
                          for (var wI in c.wires)
                          {
                              var w = c.wires[wI];
              Severity: Minor
              Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

                Function setOptions has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                     setOptions: function(options) {
                    
                        Y.WireWiringEditor.superclass.setOptions.call(this, options);
                    
                        // Load the modules from options
                Severity: Minor
                Found in sandbox/editor/editor.js - About 1 hr to fix

                  Function _renderInputsOutputs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                     _renderInputsOutputs: function () {
                  
                        this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
                  
                        var bb = this.get('boundingBox'),
                  Severity: Minor
                  Found in src/inout-container/js/inout-container.js - About 1 hr to fix

                    Function _renderInputsOutputs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                       _renderInputsOutputs: function () {
                    
                          this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
                    
                          var bb = this.get('boundingBox'),
                    Severity: Minor
                    Found in build/inout-container/inout-container.js - About 1 hr to fix

                      Function _renderInputsOutputs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                         _renderInputsOutputs: function () {
                      
                            this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
                      
                            var bb = this.get('boundingBox'),
                      Severity: Minor
                      Found in build/wireit-all/wireit-all.js - About 1 hr to fix

                        Function _renderInputsOutputs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                           _renderInputsOutputs: function () {
                        
                              this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
                        
                              var bb = this.get('boundingBox'),
                        Severity: Minor
                        Found in build/inout-container/inout-container-debug.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language