neyric/wireit

View on GitHub

Showing 179 of 497 total issues

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-debug.js - About 1 hr to fix

    Function unGroup has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        unGroup: function()
        {
            if (Y.Lang.isValue(this.groupContainer))
            {
            this.expand();
    Severity: Minor
    Found in sandbox/grouping/js/Group.js - About 1 hr to fix

      Function Xml has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      SyntaxHighlighter.brushes.Xml = function()
      {
          function process(match, regexInfo)
          {
              var constructor = SyntaxHighlighter.Match,
      Severity: Minor
      Found in sandbox/res/SyntaxHighlighter/shBrushXml.js - About 1 hr to fix

        Function getAndCheckOverrides has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            getAndCheckOverrides: function(containerUIMap, groupUIMap)
            {
                var tempGroup = {};
                Y.mix(tempGroup, this);
                tempGroup.containers = [];
        Severity: Minor
        Found in sandbox/grouping/js/Group.js - About 1 hr to fix

          Function draw has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

             draw: function() {
                var margin = [4,4];
          
                // Get the positions of the terminals
                var p1 = this.terminal1.getXY();
          Severity: Minor
          Found in sandbox/wireit-step-wire/wireit-step-wire.js - About 1 hr to fix

            Function replaceChild has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            XNode.prototype.replaceChild = function(newNode, oldNode) {
              if (oldNode == newNode) {
                return;
              }
            
            
            Severity: Minor
            Found in sandbox/grouping/examples/sawire/xml/dom.js - About 1 hr to fix

              Function setupWidget has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                 setupWidget: function(displayDiv) {
                  
                      this.display = {};
                      this.display.mainDiv = displayDiv;
                      
              Severity: Minor
              Found in sandbox/grouping/js/Grouper.js - About 1 hr to fix

                Function _onDragEditStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                   _onDragEditStart: function (ev) {
                      // save the position
                      this._editwireX = ev.pageX;
                      this._editwireY = ev.pageY;
                      
                Severity: Minor
                Found in src/terminal-dragedit/js/terminal-dragedit.js - About 1 hr to fix

                  Function Sql has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  SyntaxHighlighter.brushes.Sql = function()
                  {
                      var funcs    =    'abs avg case cast coalesce convert count current_timestamp ' +
                                      'current_user day isnull left lower month nullif replace right ' +
                                      'session_user space substring sum system_user upper user year';
                  Severity: Minor
                  Found in sandbox/res/SyntaxHighlighter/shBrushSql.js - About 1 hr to fix

                    Function clearExplode has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Y.Layer.prototype.clearExplode = function(callback, bind) {
                    
                       var center = [ Math.floor(Y.DOM.viewportRegion().width/2),
                                        Math.floor(Y.DOM.viewportRegion().height/2)];
                       var R = 1.2*Math.sqrt( Math.pow(center[0],2)+Math.pow(center[1],2));
                    Severity: Minor
                    Found in sandbox/clearExplode.js - About 1 hr to fix

                      Function generateExternal has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              var generateExternal = function(ftMap)
                              {
                                  for (var cI in ftMap)
                                  {
                                  var c = ftMap[cI];
                      Severity: Minor
                      Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

                        Function deserialise has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var deserialise = function(sGroup, groupToSet)
                            {
                                var group = groupToSet;
                                if (!Y.Lang.isValue(group))
                                group = new Y.Group(this.group.grouper, this.layer)
                        Severity: Minor
                        Found in sandbox/grouping/js/GroupFormContainer.js - About 1 hr to fix

                          Function xpathSort has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function xpathSort(input, sort) {
                            if (sort.length == 0) {
                              return;
                            }
                          
                          
                          Severity: Minor
                          Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 1 hr to fix

                            Function _onDragEditStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                               _onDragEditStart: function (ev) {
                                  // save the position
                                  this._editwireX = ev.pageX;
                                  this._editwireY = ev.pageY;
                                  
                            Severity: Minor
                            Found in build/wireit-all/wireit-all.js - About 1 hr to fix

                              Function _onDragEditStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                 _onDragEditStart: function (ev) {
                                    // save the position
                                    this._editwireX = ev.pageX;
                                    this._editwireY = ev.pageY;
                                    
                              Severity: Minor
                              Found in build/terminal-dragedit/terminal-dragedit-debug.js - About 1 hr to fix

                                Function _onDragEditStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                   _onDragEditStart: function (ev) {
                                      // save the position
                                      this._editwireX = ev.pageX;
                                      this._editwireY = ev.pageY;
                                      
                                Severity: Minor
                                Found in build/wireit-all/wireit-all-debug.js - About 1 hr to fix

                                  Function _onDragEditStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                     _onDragEditStart: function (ev) {
                                        // save the position
                                        this._editwireX = ev.pageX;
                                        this._editwireY = ev.pageY;
                                        
                                  Severity: Minor
                                  Found in build/terminal-dragedit/terminal-dragedit.js - About 1 hr to fix

                                    Function addRemapInput has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            var addRemapInput = function(name, moduleId, showOn, showCancel, defaultVisible, defaultName, visibleReadOnly, showSide, defaultSide)
                                    Severity: Major
                                    Found in sandbox/grouping/js/Group.js - About 1 hr to fix

                                      Function insertBefore has 28 lines of code (exceeds 25 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

                                        Function xmlValue has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        function xmlValue(node) {
                                          if (!node) {
                                            return '';
                                          }
                                        
                                        
                                        Severity: Minor
                                        Found in sandbox/grouping/examples/sawire/xml/util.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