mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

Function name has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        $.fn[ name ] = function( options ) {
            var isMethodCall = typeof options === "string";
            var args = widgetSlice.call( arguments, 1 );
            var returnValue = this;

Severity: Minor
Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 2 hrs to fix

    Function name has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn[ name ] = function( options ) {
            var isMethodCall = typeof options === "string";
            var args = widgetSlice.call( arguments, 1 );
            var returnValue = this;
    
    
    Severity: Minor
    Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 2 hrs to fix

      Function treeCreate has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              treeCreate: function (ctx) {
                  var tree = ctx.tree,
                      opts = ctx.options;
      
                  if (
      Severity: Minor
      Found in src/jquery.fancytree.logger.js - About 2 hrs to fix

        Function updateBreadcrumb has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function updateBreadcrumb(tsn, loadTreeNodes) {
                // var $ol = $("ol.breadcrumb").text("...");
                var $ol = $("ol.breadcrumb").addClass("busy");
                _callItis("getFullHierarchyFromTSN", {
                    tsn: tsn,
        Severity: Minor
        Found in demo/taxonomy-browser/taxonomy-browser-itis.js - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                          if ( ( mappedTypes || origType === handleObj.origType ) &&
                              ( !handler || handler.guid === handleObj.guid ) &&
                              ( !tmp || tmp.test( handleObj.namespace ) ) &&
                              ( !selector || selector === handleObj.selector ||
                                  selector === "**" && handleObj.selector ) ) {
          Severity: Critical
          Found in lib/jquery.js - About 2 hrs to fix

            Function name has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $.fn[ name ] = function( options ) {
                    var isMethodCall = typeof options === "string";
                    var args = widgetSlice.call( arguments, 1 );
                    var returnValue = this;
            
            
            Severity: Minor
            Found in src/jquery-ui-dependencies/jquery-ui.js - About 2 hrs to fix

              Function internalStop has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    internalStop: function internalStop() {
                      var requiredCalls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
                      config.blocking = true;
                      var test = this;
                      var pauseId = this.nextPauseId++;
              Severity: Minor
              Found in lib/qunit.js - About 2 hrs to fix

                Function toolbarChanged has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function toolbarChanged() {
                        var field = this;
                        var params = {}; // Detect if field is a select menu or a checkbox
                  
                        var value;
                Severity: Minor
                Found in lib/qunit.js - About 2 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                  if(jQuery)( function() {
                  
                      /* Check browser version, since $.browser was removed in jQuery 1.9 */
                      function _checkBrowser(){
                          var matched, browser;
                  Severity: Critical
                  Found in lib/contextmenu-abs/jquery.contextMenu-custom.js - About 2 hrs to fix

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

                                        for(var i=0; i<hrefs.length; i++){
                                            if(this.href.toLowerCase().indexOf(hrefs[i]) >= 0){
                                                $link = $(this);
                                                $link.addClass(PLUGIN_NAME);
                                                initialChoice = opts.choices[i];
                    Severity: Major
                    Found in lib/jquery.skinswitcher.js and 1 other location - About 2 hrs to fix
                    demo/sample.js on lines 55..61

                    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 75.

                    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

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

                                        for (i = 0; i < hrefs.length; i++) {
                                            if (this.href.toLowerCase().indexOf(hrefs[i]) >= 0) {
                                                $link = $(this);
                                                $link.addClass(PLUGIN_NAME);
                                                initialChoice = opts.choices[i];
                    Severity: Major
                    Found in demo/sample.js and 1 other location - About 2 hrs to fix
                    lib/jquery.skinswitcher.js on lines 39..45

                    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 75.

                    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

                    Function addChildren has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            addChildren: function (children, insertBefore) {
                                var i,
                                    l,
                                    pos,
                                    origFirstChild = this.getFirstChild(),
                    Severity: Minor
                    Found in src/jquery.fancytree.js - About 1 hr to fix

                      Function diffCleanupEfficiency has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            DiffMatchPatch.prototype.diffCleanupEfficiency = function (diffs) {
                              var changes, equalities, equalitiesLength, lastequality, pointer, preIns, preDel, postIns, postDel;
                              changes = false;
                              equalities = []; // Stack of indices where equalities are found.
                        
                      Severity: Minor
                      Found in lib/qunit.js - About 1 hr to fix

                        Function _createForOfIteratorHelper has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function _createForOfIteratorHelper(o, allowArrayLike) {
                              var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
                          
                              if (!it) {
                                if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
                        Severity: Minor
                        Found in lib/qunit.js - About 1 hr to fix

                          Function clearFilter has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              $.ui.fancytree._FancytreeClass.prototype.clearFilter = function () {
                                  var $title,
                                      statusNode = this.getRootNode()._findDirectChild(KeyNoData),
                                      escapeTitles = this.options.escapeTitles,
                                      enhanceTitle = this.options.enhanceTitle,
                          Severity: Minor
                          Found in src/jquery.fancytree.filter.js - About 1 hr to fix

                            Function select has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            select = Sizzle.select = function( selector, context, results, seed ) {
                                var i, tokens, token, type, find,
                                    compiled = typeof selector === "function" && selector,
                                    match = !seed && tokenize( ( selector = compiled.selector || selector ) );
                            
                            
                            Severity: Minor
                            Found in lib/jquery.js - About 1 hr to fix

                              Function matcherFromTokens has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function matcherFromTokens( tokens ) {
                                  var checkContext, matcher, j,
                                      len = tokens.length,
                                      leadingRelative = Expr.relative[ tokens[ 0 ].type ],
                                      implicitRelative = leadingRelative || Expr.relative[ " " ],
                              Severity: Minor
                              Found in lib/jquery.js - About 1 hr to fix

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

                                        $(window).on("hashchange", function (e) {
                                            var tsn = $.bbq.getState("tsn");
                                            console.log("bbq tsn", tsn);
                                            if (tsn) {
                                                updateBreadcrumb(tsn, true);
                                Severity: Major
                                Found in demo/taxonomy-browser/taxonomy-browser-itis.js and 1 other location - About 1 hr to fix
                                demo/taxonomy-browser/taxonomy-browser.js on lines 463..469

                                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 73.

                                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

                                        $(window).on("hashchange", function (e) {
                                            var key = $.bbq.getState("key");
                                            console.log("bbq key", key);
                                            if (key) {
                                                updateBreadcrumb(key, true);
                                Severity: Major
                                Found in demo/taxonomy-browser/taxonomy-browser.js and 1 other location - About 1 hr to fix
                                demo/taxonomy-browser/taxonomy-browser-itis.js on lines 346..352

                                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 73.

                                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

                                Function _classes has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        _classes: function( options ) {
                                            var full = [];
                                            var that = this;
                                
                                            options = $.extend( {
                                Severity: Minor
                                Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language