etnbrd/flx-compiler

View on GitHub

Showing 623 of 1,229 total issues

Avoid deeply nested control flow statements.
Open

                        if ( (elem = matcherOut[i]) ) {
                            // Restore matcherIn since elem is not yet a final match
                            temp.push( (matcherIn[i] = elem) );
                        }
Severity: Major
Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                        if ( xhrOnUnloadAbort ) {
                                            delete xhrCallbacks[ handle ];
                                        }
    Severity: Major
    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if ( !xhrCallbacks ) {
                                      xhrCallbacks = {};
                                      jQuery( window ).unload( xhrOnUnloadAbort );
                                  }
      Severity: Major
      Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                if (tree.dep[j].name === tree.ids[i].id) {
                  // console.log("   - ", tree.dep[j]);
                  _down.push(j);
                }
        Severity: Major
        Found in prototypes/blender.old/lib/reduction.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              for ( conv2 in converters ) {
          
                                  // If conv2 outputs current
                                  tmp = conv2.split(" ");
                                  if ( tmp[ 1 ] === current ) {
          Severity: Major
          Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if (_this._parseCSV.nextCharactersAreUnicode === 1) {
                                  _this._parseCSV.firstPartOfHex = sd.write(_byteBuffer);
                                } else {
                                  _realByteString = _this._parseCSV.firstPartOfHex + sd.write(_byteBuffer);
                                  _realByte = parseInt(_realByteString, 16);
            Severity: Major
            Found in test-set/redis_key_overview-master/index-flx.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                        for (var k = 0; k < tree.dep.length; k++) {
                          for (var m = 0; m < tree.dep[i].names.length; m++) { var name = tree.dep[i].names[m];
                            if (name === tree.dep[k].to) {
                              tree.dep[k].index = m;
                              tree.dep[k].to = tree.dep[i].name;
              Severity: Major
              Found in prototypes/blender.old/lib/reduction.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        for ( type in data.events ) {
                                            if ( special[ type ] ) {
                                                jQuery.event.remove( elem, type );
                
                                            // This is a shortcut to avoid jQuery.event.remove's overhead
                Severity: Major
                Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if ( hasScripts ) {
                                              jQuery.merge( scripts, getAll( node, "script" ) );
                                          }
                  Severity: Major
                  Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                      } else if (_byte === 92) {
                                        _this._parseCSV.nextCharCouldBeEscaped = true;
                                      } else if (_byte === 34) {
                                        _key = sd.write(new Buffer(_this._parseCSV.remainingBytes));
                                        _this._parseCSV.remainingBytes = [];
                    Severity: Major
                    Found in test-set/redis_key_overview-master/index-flx.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if ( Expr.relative[ tokens[j].type ] ) {
                                              break;
                                          }
                      Severity: Major
                      Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if ( conv && s["throws"] ) {
                                                response = conv( response );
                                            } else {
                                                try {
                                                    response = conv( response );
                        Severity: Major
                        Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                              if ( xhr.readyState !== 4 ) {
                                                                  xhr.abort();
                                                              }
                          Severity: Major
                          Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                if ( typeof xhr.responseText === "string" ) {
                                                                    responses.text = xhr.responseText;
                                                                }
                            Severity: Major
                            Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if (cQindex === -1) {
                                                    LQ.docs.push(doc);
                                                    LQ._distributeChange(doc, evName, true);    //doc wasn't in the result, but after update is
                              
                                                  } else {
                              Severity: Major
                              Found in test-set/Moonridge-master/mr-rpc-methods.js - About 45 mins to fix

                                Function extractUp has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function extractUp(tree, id) {
                                
                                  var _n = {};
                                  var __n = {};
                                  var _d = {};
                                Severity: Minor
                                Found in prototypes/blender.old/lib/extraction.js - About 45 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 deeply nested control flow statements.
                                Open

                                                    if (methodName === 'sort' && opts.count) {
                                                        throw new Error('Mongoose does not support sort and count in one query');    //TODO remove when we update to mongoose 3.9.2
                                                    }
                                Severity: Major
                                Found in test-set/Moonridge-master/query-builder.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if (opts[methodName]) {
                                                          throw new Error(methodName + ' method can be called just once per query');
                                                      } else {
                                                          opts[methodName] = args; //we shall add it to the options, this object will be used when reiterating on LQ
                                                      }
                                  Severity: Major
                                  Found in test-set/Moonridge-master/query-builder.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                            if (tree.dep[j].to === tree.ids[i].id) {
                                              // console.log("   + ", tree.dep[j]);
                                              _up.push(j);
                                            }
                                    Severity: Major
                                    Found in prototypes/blender.old/lib/reduction.js - About 45 mins to fix

                                      Function redTree has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      function redTree() {
                                        var _ids = [];
                                      
                                        for (var j = 0; j < this.dep.length; j++) {
                                          var index = undefined;
                                      Severity: Minor
                                      Found in prototypes/blender.old/lib/graphviz.js - About 45 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