neyric/wireit

View on GitHub

Showing 179 of 497 total issues

Function generateFields has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    generateFields: function(fieldConfigs, overrides, external)
    {
        var fields = [];
        var neededFields = [];
        var terminalNamesUsed  = [];
Severity: Major
Found in sandbox/grouping/js/GroupUtils.js - About 2 hrs to fix

    Function CSS has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    SyntaxHighlighter.brushes.CSS = function()
    {
        function getKeywordsCSS(str)
        {
            return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
    Severity: Major
    Found in sandbox/res/SyntaxHighlighter/shBrushCss.js - About 2 hrs to fix

      Function addRemapInput has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              var addRemapInput = function(name, moduleId, showOn, showCancel, defaultVisible, defaultName, visibleReadOnly, showSide, defaultSide)
              {
                  var addTds = function(row) {
                      tds = [];
                      
      Severity: Major
      Found in sandbox/grouping/js/Group.js - About 2 hrs to fix

        Function _drawArrow has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

           _drawArrow: function(src, tgt) {
        
        
              var d = 7, // arrow width/2
                  distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
        Severity: Minor
        Found in src/arrow-wire/js/arrow-wire.js - About 2 hrs to fix

          Function _drawArrow has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

             _drawArrow: function(src, tgt) {
          
          
                var d = 7, // arrow width/2
                    distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
          Severity: Minor
          Found in build/wireit-all/wireit-all-debug.js - About 2 hrs to fix

            Function _drawArrow has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

               _drawArrow: function(src, tgt) {
            
            
                  var d = 7, // arrow width/2
                      distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
            Severity: Minor
            Found in build/arrow-wire/arrow-wire-debug.js - About 2 hrs to fix

              Function _drawArrow has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                 _drawArrow: function(src, tgt) {
              
              
                    var d = 7, // arrow width/2
                        distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
              Severity: Minor
              Found in build/wireit-all/wireit-all.js - About 2 hrs to fix

                Function _drawArrow has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                   _drawArrow: function(src, tgt) {
                
                
                      var d = 7, // arrow width/2
                          distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
                Severity: Minor
                Found in build/arrow-wire/arrow-wire.js - About 2 hrs to fix

                  Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                     saveWiring: function (e) {
                        var o = {
                           name: Y.one('#wiring-name').get('value') || 'Unnamed'
                        };
                        
                  Severity: Minor
                  Found in src/wireit-app/js/editor-view.js - About 1 hr to fix

                    Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                       saveWiring: function (e) {
                          var o = {
                             name: Y.one('#wiring-name').get('value') || 'Unnamed'
                          };
                          
                    Severity: Minor
                    Found in build/wireit-all/wireit-all.js - About 1 hr to fix

                      Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                         saveWiring: function (e) {
                            var o = {
                               name: Y.one('#wiring-name').get('value') || 'Unnamed'
                            };
                            
                      Severity: Minor
                      Found in build/wireit-app/wireit-app-debug.js - About 1 hr to fix

                        Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                           saveWiring: function (e) {
                              var o = {
                                 name: Y.one('#wiring-name').get('value') || 'Unnamed'
                              };
                              
                        Severity: Minor
                        Found in build/wireit-all/wireit-all-debug.js - About 1 hr to fix

                          Function saveWiring has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                             saveWiring: function (e) {
                                var o = {
                                   name: Y.one('#wiring-name').get('value') || 'Unnamed'
                                };
                                
                          Severity: Minor
                          Found in build/wireit-app/wireit-app.js - About 1 hr to fix

                            Function xpathReduce has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function xpathReduce(stack, ahead) {
                              var cand = null;
                            
                              if (stack.length > 0) {
                                var top = stack[stack.length-1];
                            Severity: Minor
                            Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 1 hr to fix

                              Function loadPipe has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  loadPipe: function(name) {
                              
                                      if(!this.isSaved()) {
                                          if( !confirm("Warning: Your work is not saved yet ! Press ok to continue anyway.") ) {
                                              return;
                              Severity: Minor
                              Found in sandbox/editor/editor.js - About 1 hr to fix

                                Function getCollapsedConfig has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    getCollapsedConfig: function(group, map)
                                    {
                                        if (!Y.Lang.isObject(map))
                                        map = Y.GroupUtils.getMap(group);
                                        
                                Severity: Minor
                                Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

                                  Function renderLayer has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        renderLayer: function() {
                                           
                                           console.log("rendering Layer !!");
                                           
                                           this.layer = new Y.Layer({
                                  Severity: Minor
                                  Found in sandbox/yide/tabs/layerTab.js - About 1 hr to fix

                                    Function parseData has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    var parseData = function(name, data, file) {
                                        var i, o;
                                        for (i in data) {
                                            if (i === 'submodules' || i === 'plugins') {
                                                for (o in data[i]) {
                                    Severity: Minor
                                    Found in src/wireit-loader/scripts/meta_join.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 xpathParseInit has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    function xpathParseInit() {
                                      if (xpathRules.length) {
                                        return;
                                      }
                                    
                                    
                                    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 _combineSteps has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    LocationExpr.prototype._combineSteps = function(prevStep, nextStep) {
                                      if (!prevStep) return null;
                                      if (!nextStep) return null;
                                      var hasPredicates = (prevStep.predicates && prevStep.predicates.length > 0);
                                      if (prevStep.nodetest instanceof NodeTestAny && !hasPredicates) {
                                    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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language