mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                        if ( !$.expr.pseudos ) {
                            $.expr.pseudos = $.expr[ ":" ];
                        }
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery-ui-iife.js and 2 other locations - About 45 mins to fix
                    src/jquery-ui-dependencies/jquery-ui.js on lines 1282..1284
                    src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1282..1284

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 50.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                                        cnList = node.data.commonNames
                                            ? $.map(node.data.commonNames, function (o) {
                                                    return o.name;
                                              })
                                            : [];
                    Severity: Minor
                    Found in demo/taxonomy-browser/taxonomy-browser-itis.js and 1 other location - About 45 mins to fix
                    demo/taxonomy-browser/taxonomy-browser.js on lines 407..411

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 50.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    if ( !$.expr.pseudos ) {
                        $.expr.pseudos = $.expr[ ":" ];
                    }
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js and 2 other locations - About 45 mins to fix
                    src/jquery-ui-dependencies/jquery-ui-iife.js on lines 1273..1275
                    src/jquery-ui-dependencies/jquery-ui.js on lines 1282..1284

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 50.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    if ( !$.expr.pseudos ) {
                        $.expr.pseudos = $.expr[ ":" ];
                    }
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery-ui.js and 2 other locations - About 45 mins to fix
                    src/jquery-ui-dependencies/jquery-ui-iife.js on lines 1273..1275
                    src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1282..1284

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 50.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                                        cnList = node.data.vernacularNames
                                            ? $.map(node.data.vernacularNames, function (o) {
                                                    return o.vernacularName;
                                              })
                                            : [];
                    Severity: Minor
                    Found in demo/taxonomy-browser/taxonomy-browser.js and 1 other location - About 45 mins to fix
                    demo/taxonomy-browser/taxonomy-browser-itis.js on lines 322..326

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 50.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                          function addClass(elem, name) {
                            if (!hasClass(elem, name)) {
                              elem.className += (elem.className ? ' ' : '') + name;
                            }
                          }
                    Severity: Minor
                    Found in lib/qunit.js and 1 other location - About 40 mins to fix
                    lib/qunit-composite.js on lines 33..37

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 49.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                        function addClass(elem, name) {
                            if (!hasClass(elem, name)) {
                                elem.className += (elem.className ? " " : "") + name;
                            }
                        }
                    Severity: Minor
                    Found in lib/qunit-composite.js and 1 other location - About 40 mins to fix
                    lib/qunit.js on lines 5673..5677

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 49.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    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
                            Severity
                            Category
                            Status
                            Source
                            Language