neyric/wireit

View on GitHub

Showing 179 of 497 total issues

Avoid deeply nested control flow statements.
Open

    if (this.nodetest.evaluate(ctx).booleanValue()) {
      nodelist.push(input);
    }
Severity: Major
Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 45 mins to fix

    Consider simplifying this complex logical expression.
    Open

      if (expr.steps && !expr.absolute && expr.steps.length == 1 &&
          expr.steps[0].axis == 'child' && expr.steps[0].predicate.length == 0) {
        ret = expr.steps[0].nodetest.evaluate(context).booleanValue();
    
      } else {
    Severity: Major
    Found in sandbox/grouping/examples/sawire/xml/xslt.js - About 40 mins to fix

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

      function xPathStep(nodes, steps, step, input, ctx) {
      Severity: Minor
      Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 35 mins to fix

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

        function makeFunctionCallExpr2(name, pareno, arg1, args, parenc) {
        Severity: Minor
        Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 35 mins to fix

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

                  var mergeTerminalOverrides = function(terminalConfigs, overrides, usedNames, forceVisible, terminalMap)
          Severity: Minor
          Found in sandbox/grouping/js/GroupUtils.js - About 35 mins to fix

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

                    var addControls = function (fieldsAndTerminals, overrides, results, showOnByIndex, showOffByIndex)
            Severity: Minor
            Found in sandbox/grouping/js/Group.js - About 35 mins to fix

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

                  mergeFieldOverrides : function(fieldConfigs, overrides, usedNames, forceVisible, fieldMap)
              Severity: Minor
              Found in sandbox/grouping/js/GroupUtils.js - About 35 mins to fix

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

                Y.LayerContainer.DD = function( terminals, subLayer, id, sGroup, config) {
                Severity: Minor
                Found in sandbox/layer-container/layer-container.js - About 35 mins to fix

                  Function ComposedContainer has a Cognitive Complexity of 7 (exceeds 5 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 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 Xml has a Cognitive Complexity of 7 (exceeds 5 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 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 executeModules has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                     executeModules: function(moduleId, srcTerminal) {
                        
                           //console.log("executeModules", moduleId, srcTerminal);
                           var params = this.execValues[moduleId][srcTerminal];
                        
                  Severity: Minor
                  Found in sandbox/jsBox/ExecutionFrame.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 executeModules has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                     executeModules: function(moduleId, srcTerminal) {
                        
                           //console.log("executeModules", moduleId, srcTerminal);
                           var params = this.execValues[moduleId][srcTerminal];
                        
                  Severity: Minor
                  Found in sandbox/grouping/examples/sawire/ExecutionFrame.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 lang has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                    'lang': function(ctx) {
                      assert(this.args.length == 1);
                      var lang = this.args[0].evaluate(ctx).stringValue();
                      var xmllang;
                      var n = ctx.node;
                  Severity: Minor
                  Found in sandbox/grouping/examples/sawire/xml/xpath.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 false;
                  Severity: Major
                  Found in sandbox/grouping/examples/sawire/xml/xslt.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return nextStep;
                    Severity: Major
                    Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                        return null;
                      Severity: Major
                      Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 30 mins to fix

                        Function evaluate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        FilterExpr.prototype.evaluate = function(ctx) {
                          var nodes = this.expr.evaluate(ctx).nodeSetValue();
                          for (var i = 0; i < this.predicate.length; ++i) {
                            var nodes0 = nodes;
                            nodes = [];
                        Severity: Minor
                        Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 25 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 xpathSortByKey has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function xpathSortByKey(v1, v2) {
                          // NOTE: Sort key vectors of different length never occur in
                          // xsltSort.
                        
                          for (var i = 0; i < v1.key.length; ++i) {
                        Severity: Minor
                        Found in sandbox/grouping/examples/sawire/xml/xpath.js - About 25 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 initializer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                           initializer: function () {
                              
                              Y.WireBase.superclass.initializer.apply(this, arguments);
                              
                              var src = this.get('src'), tgt = this.get('tgt');
                        Severity: Minor
                        Found in src/wire-base/js/wire-base.js - About 25 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

                        Severity
                        Category
                        Status
                        Source
                        Language