neyric/wireit

View on GitHub

Showing 179 of 497 total issues

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

function xsltPassText(template) {
  if (!template.nodeValue.match(/^\s*$/)) {
    return true;
  }

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 xsltPassThrough has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function xsltPassThrough(input, template, output, outputDocument) {
  if (template.nodeType == DOM_TEXT_NODE) {
    if (xsltPassText(template)) {
      var node = domCreateTextNode(outputDocument, template.nodeValue);
      domAppendChild(output, node);
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 createTerminals has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

   createTerminals: function() {
      
      // Output Terminal
      if(!this.outputTerminal) {
        this.outputTerminal = this.addTerminal({xtype: "Y.TerminalOutput", "name": "out"});
Severity: Minor
Found in sandbox/grouping/examples/sawire/containers/jsrunner.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 id has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  'id': function(ctx) {
    assert(this.args.length == 1);
    var e = this.args[0].evaluate(ctx);
    var ret = [];
    var ids;
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 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

Function RubberBand has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Y.RubberBand = function(grouper) {
    
    Y.RubberBand.superclass.constructor.call(this, grouper.layer.el);
    
    this.grouper = grouper;
Severity: Minor
Found in sandbox/grouping/js/RubberBand.js - About 1 hr to fix

    Function setWiring has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

       setWiring: function (wiring) {
          
          var that = this,
              layer = this.layer;
    
    
    Severity: Minor
    Found in src/wireit-app/js/editor-view.js - About 1 hr to fix

      Function setWiring has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

         setWiring: function (wiring) {
            
            var that = this,
                layer = this.layer;
      
      
      Severity: Minor
      Found in build/wireit-all/wireit-all.js - About 1 hr to fix

        Function setWiring has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

           setWiring: function (wiring) {
              
              var that = this,
                  layer = this.layer;
        
        
        Severity: Minor
        Found in build/wireit-app/wireit-app.js - About 1 hr to fix

          Function setWiring has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

             setWiring: function (wiring) {
                
                var that = this,
                    layer = this.layer;
          
          
          Severity: Minor
          Found in build/wireit-all/wireit-all-debug.js - About 1 hr to fix

            Function setWiring has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

               setWiring: function (wiring) {
                  
                  var that = this,
                      layer = this.layer;
            
            
            Severity: Minor
            Found in build/wireit-app/wireit-app-debug.js - About 1 hr to fix

              Function ComposedContainer has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jsBox.ComposedContainer = function(options, layer) {
                 
                 if(!options.fields) {
                    
                    options.fields = [];
              Severity: Minor
              Found in sandbox/grouping/examples/sawire/modules.js - About 1 hr to fix

                Function mergeFieldOverrides has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    mergeFieldOverrides : function(fieldConfigs, overrides, usedNames, forceVisible, fieldMap)
                    {
                        for (var fI in fieldConfigs)
                        {
                        var f = fieldConfigs[fI];
                Severity: Minor
                Found in sandbox/grouping/js/GroupUtils.js - About 1 hr to fix

                  Function value has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                           var value = function(a,b,c,d,e,f,g,h) {
                  Severity: Major
                  Found in sandbox/grouping/examples/sawire/ExecutionFrame.js - About 1 hr to fix

                    Function _drawArrow has a Cognitive Complexity of 9 (exceeds 5 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 55 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 setExecutionStateForContainer has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    ExecutionFrame.setExecutionStateForContainer =  function(container, state){
                        var bodyEl= container.bodyEl;
                          if( bodyEl ) {
                             if( state != "js-execution-starting") Y.one(bodyEl).removeClass("js-execution-starting");
                             if( state != "js-execution-ok") Y.one(bodyEl).removeClass("js-execution-ok");
                    Severity: Minor
                    Found in sandbox/grouping/examples/sawire/ExecutionFrame.js - About 55 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 xpathSort has a Cognitive Complexity of 9 (exceeds 5 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 55 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 addTerminal has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            var addTerminal = function(internalName, tMap, override, moduleId, fieldTerminals, showOn, showOff)
                    Severity: Major
                    Found in sandbox/grouping/js/Group.js - About 50 mins to fix

                      Function addField has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              var addField = function(internalName, fMap, override, moduleId, fieldTerminals, showOn, showOff)
                      Severity: Major
                      Found in sandbox/grouping/js/Group.js - About 50 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                  if( xml == "[wired]") {
                                      var wires = this.wiringConfig.working.wires;
                                      var paramValue;
                                      for(var i = 0 ; i < wires.length ; i++) {
                                         var wire = wires[i];
                        Severity: Major
                        Found in sandbox/grouping/examples/sawire/ExecutionFrame.js - About 45 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language