etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

Avoid deeply nested control flow statements.
Open

                    if ( elem && elem.parentNode ) {
                        // Handle the case where IE, Opera, and Webkit return items
                        // by name instead of ID
                        if ( elem.id === m ) {
                            results.push( 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 ( cache[1] === true ) {
                                    return true;
                                }
    Severity: Major
    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

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

      function detectDependency(dep, flx) {
      
        var sharing = Object.keys(dep.variable.flxs).length,
            modifiers = Object.keys(dep.variable.modifierFlxs).length,
            source = dep.source.name,
      Severity: Minor
      Found in lib/linker/core.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 ( name in thisCache ) {
                              name = [ name ];
                          } else {
                              name = name.split(" ");
                          }
      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 ( (event.result = ret) === false ) {
                                    event.preventDefault();
                                    event.stopPropagation();
                                }
        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 (result.passed) passed++; else failed++;
          Severity: Major
          Found in test-set/timbits-master/lib/timbits.js - About 45 mins to fix

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

            function register(name, fn, scope) {
            
              function _register(name, fn, scope) { 
                var _scope = b.objectExpression([]);
                if (scope) {
            Severity: Minor
            Found in lib/js-printer/builders.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 (config.adminRoles.indexOf(role) >= 0) { return true; }
            Severity: Major
            Found in test-set/express-couchUser-master/index.js - About 45 mins to fix

              Function init has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  init: function( elem, options, prop, end, easing, unit ) {
              Severity: Minor
              Found in test-set/gifsockets-server-master/public/js/jquery.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
                                            cur += clazz + " ";
                                        }
                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.splice(index, 0, doc);    //insert the document
                                      } else {
                                        if (cQindex !== index) {
                                          if (cQindex < index) {  // if we remove item before, the whole array shifts, so we have to compensate index by 1.
                  Severity: Major
                  Found in test-set/Moonridge-master/mr-rpc-methods.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                          if (_byte === 120) {
                                            _this._parseCSV.nextCharactersAreUnicode = 2;
                                          } else {
                                            _foundEscapedChar = false;
                                            _ref = _this._escapedCharacters;
                    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

                                              while ( j-- ) {
                                                  if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
                                                      elem.removeChild( tbody );
                                                  }
                                              }
                      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 ( deleteExpando ) {
                                                    delete elem[ internalKey ];
                        
                                                } else if ( typeof elem.removeAttribute !== core_strundefined ) {
                                                    elem.removeAttribute( internalKey );
                        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) {
                                                index = getIndexInSorted(doc, LQ.docs, sortBy);
                                                LQ.docs.splice(index, 0, doc);
                                                if (LQ.indexedByMethods.limit) {
                                                  if (LQ.docs.length > LQ.indexedByMethods.limit[0]) {
                          Severity: Major
                          Found in test-set/Moonridge-master/mr-rpc-methods.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/modules/keyoverview.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if ( !(unmatched[i] || setMatched[i]) ) {
                                                              setMatched[i] = pop.call( results );
                                                          }
                              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 ( rscriptType.test( node.type || "" ) &&
                                                            !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
                                
                                                            if ( node.src ) {
                                                                // Hope ajax is available...
                                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 ( (seed = find(
                                                          token.matches[0].replace( runescape, funescape ),
                                                          rsibling.test( tokens[0].type ) && context.parentNode || context
                                                      )) ) {
                                  
                                  
                                  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, null);
                                                        }
                                    Severity: Major
                                    Found in test-set/Moonridge-master/mr-rpc-methods.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language