mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

                      if (resultsLen < limit) {
                        q.add(objResults);
                        ++resultsLen;
                      } else {
                        ++limitedCount;
Severity: Major
Found in lib/qunit.js and 1 other location - About 1 hr to fix
lib/qunit.js on lines 4793..4799

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

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 _afterExpand has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            function _afterExpand(ok, args) {
                // ctx.tree.info("ok:" + ok, args);
                if (ok) {
                    // #1108 minExpandLevel: 2 together with table extension does not work
                    // don't call when 'ok' is false:
Severity: Minor
Found in src/jquery.fancytree.table.js - About 1 hr to fix

    Function _on has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _on: function( suppressDisabledCheck, element, handlers ) {
                var delegateElement;
                var instance = this;
    
                // No suppressDisabledCheck flag, shuffle arguments
    Severity: Minor
    Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 1 hr to fix

      Function _on has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _on: function( suppressDisabledCheck, element, handlers ) {
              var delegateElement;
              var instance = this;
      
              // No suppressDisabledCheck flag, shuffle arguments
      Severity: Minor
      Found in src/jquery-ui-dependencies/jquery-ui.js - About 1 hr to fix

        Function _on has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _on: function( suppressDisabledCheck, element, handlers ) {
                var delegateElement;
                var instance = this;
        
                // No suppressDisabledCheck flag, shuffle arguments
        Severity: Minor
        Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 1 hr to fix

          Function valid has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                valid: function valid() {
                  // Internally-generated tests are always valid
                  if (this.callback && this.callback.validTest) {
                    return true;
                  }
          Severity: Minor
          Found in lib/qunit.js - About 1 hr to fix

            Function allSettled has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  function allSettled(arr) {
                    var P = this;
                    return new P(function (resolve, reject) {
                      if (!(arr && typeof arr.length !== 'undefined')) {
                        return reject(new TypeError(_typeof(arr) + ' ' + arr + ' is not iterable(cannot read property Symbol(Symbol.iterator))'));
            Severity: Minor
            Found in lib/qunit.js - About 1 hr to fix

              Function onIframeLoad has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function onIframeLoad() {
                          var moduleName,
                              testName,
                              count = 0;
              
              
              Severity: Minor
              Found in lib/qunit-composite.js - About 1 hr to fix

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

                                        var data = $.extend({}, tree.ext.menu.data, {
                                            menuItem: ui.item,
                                            menuId: ui.item.find(">a").attr("href"),
                                        });
                Severity: Major
                Found in src/jquery.fancytree.menu.js and 1 other location - About 1 hr to fix
                src/jquery.fancytree.menu.js on lines 94..97

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

                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

                                        var data = $.extend({}, tree.ext.menu.data, {
                                            menuItem: ui.item,
                                            menuId: ui.item.find(">a").attr("href"),
                                        });
                Severity: Major
                Found in src/jquery.fancytree.menu.js and 1 other location - About 1 hr to fix
                src/jquery.fancytree.menu.js on lines 101..104

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

                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 _afterExpand has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            function _afterExpand(ok) {
                                tree.redrawViewport(true);
                
                                if (ok) {
                                    if (
                Severity: Minor
                Found in src/jquery.fancytree.grid.js - About 1 hr to fix

                  Function nodeRender has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          nodeRender: function (ctx, force, deep, collapsed, _recursive) {
                              var res = this._superApply(arguments),
                                  node = ctx.node,
                                  isRootNode = !node.parent;
                  
                  
                  Severity: Minor
                  Found in src/jquery.fancytree.fixed.js - About 1 hr to fix

                    Function ajaxHandleResponses has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function ajaxHandleResponses( s, jqXHR, responses ) {
                    
                        var ct, type, finalDataType, firstDataType,
                            contents = s.contents,
                            dataTypes = s.dataTypes;
                    Severity: Minor
                    Found in lib/jquery.js - About 1 hr to fix

                      Function nodeClick has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              nodeClick: function (ctx) {
                                  var //pluginOpts = ctx.options.multi,
                                      tree = ctx.tree,
                                      node = ctx.node,
                                      activeNode = tree.getActiveNode() || tree.getFirstChild(),
                      Severity: Minor
                      Found in src/jquery.fancytree.multi.js - About 1 hr to fix

                        Function getUrlConfigHtml has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              function getUrlConfigHtml() {
                                var selection = false;
                                var urlConfig = config.urlConfig;
                                var urlConfigHtml = '';
                          
                        Severity: Minor
                        Found in lib/qunit.js - About 1 hr to fix

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

                                          for (var i = 0; i < searchLen; ++i) {
                                            var targetI = matchesBest[i]; // score only goes down if they're not consecutive
                            
                                            if (lastTargetI !== targetI - 1) score -= targetI;
                                            lastTargetI = targetI;
                          Severity: Major
                          Found in lib/qunit.js and 1 other location - About 1 hr to fix
                          lib/qunit.js on lines 5292..5297

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

                          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

                                            if (isMatch) {
                                              matchesStrict[matchesStrictLen++] = targetI;
                                              ++searchI;
                            
                                              if (searchI === searchLen) {
                          Severity: Major
                          Found in lib/qunit.js and 1 other location - About 1 hr to fix
                          lib/qunit.js on lines 5264..5276

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

                          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

                                                              always: function () {
                                                                  // node.debug("fancytree-animating end: " + node.li.className);
                                                                  $(this).removeClass(cn.animating); // #716
                                                                  $(node.li).removeClass(cn.animating); // #717
                                                                  callback();
                          Severity: Major
                          Found in src/jquery.fancytree.js and 1 other location - About 1 hr to fix
                          src/jquery.fancytree.js on lines 5593..5598

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

                          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

                                                              function () {
                                                                  // node.debug("fancytree-animating end: " + node.li.className);
                                                                  $(this).removeClass(cn.animating); // #716
                                                                  $(node.li).removeClass(cn.animating); // #717
                                                                  callback();
                          Severity: Major
                          Found in src/jquery.fancytree.js and 1 other location - About 1 hr to fix
                          src/jquery.fancytree.js on lines 5564..5569

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

                          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

                                            if (isMatch) {
                                              matchesStrict[matchesStrictLen++] = targetI;
                                              ++searchI;
                            
                                              if (searchI === searchLen) {
                          Severity: Major
                          Found in lib/qunit.js and 1 other location - About 1 hr to fix
                          lib/qunit.js on lines 5365..5377

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

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language