mar10/fancytree

View on GitHub

Showing 460 of 700 total issues

Avoid deeply nested control flow statements.
Open

                if (x1 >= x2) {
                  // Overlap detected.
                  return this.diffBisectSplit(text1, text2, x1, y1, deadline);
                }
Severity: Major
Found in lib/qunit.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if ( copyIsArray && !Array.isArray( src ) ) {
                            clone = [];
                        } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
                            clone = {};
                        } else {
    Severity: Major
    Found in lib/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 lib/jquery.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if ( hasScripts ) {
        
                                // Support: Android <=4.0 only, PhantomJS 1 only
                                // push.apply(_, arraylike) throws on ancient WebKit
                                jQuery.merge( scripts, getAll( node, "script" ) );
        Severity: Major
        Found in lib/jquery.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if (result.score > q.peek().score) q.replaceTop(result);
          Severity: Major
          Found in lib/qunit.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if (result.score > q.peek().score) q.replaceTop(result);
            Severity: Major
            Found in lib/qunit.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                              if (hasOwn.call(val.value, _j)) {
                                urlConfigHtml += "<option value='" + escapeText(_j) + "'" + (config[val.id] === _j ? (selection = true) && " selected='selected'" : '') + '>' + escapeText(val.value[_j]) + '</option>';
                              }
              Severity: Major
              Found in lib/qunit.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

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

                  Avoid deeply nested control flow statements.
                  Open

                                          while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
                                              cur = cur.replace( " " + clazz + " ", " " );
                                          }
                  Severity: Major
                  Found in lib/jquery.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                                if( $(menu).find('LI.hover').size() == 0 ) $(menu).find('LI:last').addClass('hover');
                    Severity: Major
                    Found in lib/contextmenu-abs/jquery.contextMenu-custom.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                                  if( $(menu).find('LI.hover').size() == 0 ) $(menu).find('LI:first').addClass('hover');
                      Severity: Major
                      Found in lib/contextmenu-abs/jquery.contextMenu-custom.js - About 45 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (
                                        hitMode === "after" ||
                                        hitMode === "before" ||
                                        hitMode === "over"
                                    ) {
                        Severity: Major
                        Found in src/jquery.fancytree.dnd.js - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if (hitMode === "after" || hitMode === "before" || hitMode === "over") {
                                      markerOffsetX = dndOpts.dropMarkerOffsetX || 0;
                                      switch (hitMode) {
                                          case "before":
                                              markerAt = "top";
                          Severity: Major
                          Found in src/jquery.fancytree.dnd5.js - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                            if ( !support.focusin ) {
                                jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
                            
                                    // Attach a single capturing handler on the document while someone wants focusin/focusout
                                    var handler = function( event ) {
                            Severity: Major
                            Found in lib/jquery.js - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                          if ( support.qsa &&
                                              !nonnativeSelectorCache[ selector + " " ] &&
                                              ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
                              
                                              // Support: IE 8 only
                              Severity: Major
                              Found in lib/jquery.js - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                            if ( matcher[ expando ] ) {
                                
                                                // Find the next relative operator (if any) for proper handling
                                                j = ++i;
                                                for ( ; j < len; j++ ) {
                                Severity: Major
                                Found in lib/jquery.js - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
                                              context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
                                  
                                              context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
                                                  .replace( runescape, funescape ), context ) || [] )[ 0 ];
                                  Severity: Major
                                  Found in lib/jquery.js - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if (value === '' || rSpecialJson.test(value) || rSpecialYaml.test(value[0]) || rUntrimmed.test(value) || rNumerical.test(value) || rBool.test(value)) {
                                              if (!/\n/.test(value)) {
                                                // Complex one-line string, use JSON (quoted string)
                                                return JSON.stringify(value);
                                              } // See also <https://yaml-multiline.info/>
                                    Severity: Major
                                    Found in lib/qunit.js - About 40 mins to fix

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

                                          function _makeVirtualFunction(methodName, tree, base, extension, extName) {
                                      Severity: Minor
                                      Found in src/jquery.fancytree.js - About 35 mins to fix

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

                                                nodeRender: function (ctx, force, deep, collapsed, _recursive) {
                                        Severity: Minor
                                        Found in src/jquery.fancytree.grid.js - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language