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(result);
                        ++resultsLen;
                      } else {
                        ++limitedCount;
Severity: Major
Found in lib/qunit.js and 1 other location - About 1 hr to fix
lib/qunit.js on lines 4841..4847

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

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 (resultsLen < limit) {
                    q.add(result);
                    ++resultsLen;
                  } else {
                    ++limitedCount;
Severity: Major
Found in lib/qunit.js and 1 other location - About 1 hr to fix
lib/qunit.js on lines 4997..5003

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

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

                        helper: function (event) {
                            var $helper,
                                $nodeTag,
                                opts,
                                sourceNode = $.ui.fancytree.getNode(
Severity: Minor
Found in src/jquery.fancytree.dnd.js - About 1 hr to fix

    Function nodeRenderTitle has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            nodeRenderTitle: function (ctx, title) {
                var $cb,
                    res,
                    tree = ctx.tree,
                    node = ctx.node,
    Severity: Minor
    Found in src/jquery.fancytree.table.js - About 1 hr to fix

      Function _requireExtension has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _requireExtension: function (name, required, before, message) {
                  if (before != null) {
                      before = !!before;
                  }
                  var thisName = this._local.name,
      Severity: Minor
      Found in src/jquery.fancytree.js - About 1 hr to fix

        Function loadKeyPath has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                loadKeyPath: function (keyPathList, optsOrCallback) {
                    var callback,
                        i,
                        path,
                        self = this,
        Severity: Minor
        Found in src/jquery.fancytree.js - About 1 hr to fix

          Function extend has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          jQuery.extend = jQuery.fn.extend = function() {
              var options, name, src, copy, copyIsArray, clone,
                  target = arguments[ 0 ] || {},
                  i = 1,
                  length = arguments.length,
          Severity: Minor
          Found in lib/jquery.js - About 1 hr to fix

            Function nodeSetExpanded has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    nodeSetExpanded: function (ctx, flag, callOpts) {
                        var res,
                            self = this,
                            node = ctx.node,
                            $leftTr = $(node.tr),
            Severity: Minor
            Found in src/jquery.fancytree.fixed.js - About 1 hr to fix

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

                  } else if ($ && typeof $.cookie === "function") {
                      // Fall back to https://github.com/carhartl/jquery-cookie
                      cookieStore = {
                          get: $.cookie,
                          set: function (key, value) {
              Severity: Major
              Found in src/jquery.fancytree.persist.js and 1 other location - About 1 hr to fix
              src/jquery.fancytree.persist.js on lines 81..99

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

              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

                  if (typeof Cookies === "function") {
                      // Assume https://github.com/js-cookie/js-cookie
                      cookieStore = {
                          get: Cookies.get,
                          set: function (key, value) {
              Severity: Major
              Found in src/jquery.fancytree.persist.js and 1 other location - About 1 hr to fix
              src/jquery.fancytree.persist.js on lines 90..99

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

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

                      _changeSelectStatusAttrs: function (state) {
                          var changed = false,
                              opts = this.tree.options,
                              unselectable = FT.evalOption(
                                  "unselectable",
              Severity: Minor
              Found in src/jquery.fancytree.js - About 1 hr to fix

                Function ConsoleReporter has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    var ConsoleReporter = /*#__PURE__*/function () {
                      function ConsoleReporter(runner) {
                        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
                  
                        _classCallCheck(this, ConsoleReporter);
                Severity: Minor
                Found in lib/qunit.js - About 1 hr to fix

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

                            if (typeof then !== 'function') {
                              var _message2 = 'The value provided to `assert.rejects` in ' + '"' + currentTest.testName + '" was not a promise.';
                    
                              currentTest.assert.pushResult({
                                result: false,
                  Severity: Major
                  Found in lib/qunit.js and 1 other location - About 1 hr to fix
                  lib/qunit.js on lines 1844..1853

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

                  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

                            if (typeof block !== 'function') {
                              var _message = 'The value provided to `assert.throws` in ' + '"' + currentTest.testName + '" was not a function.';
                    
                              currentTest.assert.pushResult({
                                result: false,
                  Severity: Major
                  Found in lib/qunit.js and 1 other location - About 1 hr to fix
                  lib/qunit.js on lines 1897..1906

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

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

                      $.ui.fancytree._FancytreeClass.prototype.redrawViewport = function (force) {
                          if (this._enableUpdate === false) {
                              // tree.debug("no render", tree._enableUpdate);
                              return;
                          }
                  Severity: Minor
                  Found in src/jquery.fancytree.grid.js - About 1 hr to fix

                    Function toDict has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            toDict: function (recursive, callback) {
                                var i,
                                    l,
                                    node,
                                    res,
                    Severity: Minor
                    Found in src/jquery.fancytree.js - About 1 hr to fix

                      Function stop has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  stop: function (event, ui) {
                                      var logObject,
                                          // 'draggable' was renamed to 'ui-draggable' since jQueryUI 1.10:
                                          draggable =
                                              $(this).data("ui-draggable") ||
                      Severity: Minor
                      Found in src/jquery.fancytree.dnd.js - About 1 hr to fix

                        Function style has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            style: function( elem, name, value, extra ) {
                        
                                // Don't set styles on text and comment nodes
                                if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                                    return;
                        Severity: Minor
                        Found in lib/jquery.js - About 1 hr to fix

                          Function adjustCSS has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function adjustCSS( elem, prop, valueParts, tween ) {
                              var adjusted, scale,
                                  maxIterations = 20,
                                  currentValue = tween ?
                                      function() {
                          Severity: Minor
                          Found in lib/jquery.js - About 1 hr to fix

                            Function dispatch has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                dispatch: function( nativeEvent ) {
                            
                                    var i, j, ret, matched, handleObj, handlerQueue,
                                        args = new Array( arguments.length ),
                            
                            
                            Severity: Minor
                            Found in lib/jquery.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language