mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

        $("#btnSearch")
            .click(function (event) {
                $("#searchResultPane").collapse("show");
                search($("input[name=query]").val());
            })
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 504..509

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

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

        } else if (Array.isArray(r)) {
            res = {
                over: $.inArray("over", r) >= 0,
                before: $.inArray("before", r) >= 0,
                after: $.inArray("after", r) >= 0,
Severity: Major
Found in src/jquery.fancytree.dnd5.js and 1 other location - About 1 hr to fix
src/jquery.fancytree.dnd.js on lines 624..637

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

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 3 locations. Consider refactoring.
Open

                      if (iCurrent % 1000
                      /*itemsPerCheck*/
                      === 0) {
                        if (Date.now() - startMs >= 10
                        /*asyncInterval*/
Severity: Major
Found in lib/qunit.js and 2 other locations - About 1 hr to fix
lib/qunit.js on lines 4940..4949
lib/qunit.js on lines 4979..4988

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

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

        _openMenu: function (ctx) {
            var data,
                tree = ctx.tree,
                opts = ctx.options,
                $menu = $(opts.menu.selector);
Severity: Minor
Found in src/jquery.fancytree.menu.js - About 1 hr to fix

    Function _visitRowsUp has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _visitRowsUp: function (fn, opts) {
                var children,
                    idx,
                    parent,
                    includeHidden = !!opts.includeHidden,
    Severity: Minor
    Found in src/jquery.fancytree.js - About 1 hr to fix

      Function top has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  top: function( position, data ) {
                      var within = data.within,
                          withinOffset = within.offset.top + within.scrollTop,
                          outerHeight = within.height,
                          offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
      Severity: Minor
      Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 1 hr to fix

        Function _simpleDeepMerge has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _simpleDeepMerge() {
                var options,
                    name,
                    src,
                    copy,
        Severity: Minor
        Found in src/jquery.fancytree.js - About 1 hr to fix

          Function _subclassObject has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function _subclassObject(tree, base, extension, extName) {
                  // $.ui.fancytree.debug("_subclassObject", tree, base, extension, extName);
                  for (var attrName in extension) {
                      if (typeof extension[attrName] === "function") {
                          if (typeof tree[attrName] === "function") {
          Severity: Minor
          Found in src/jquery.fancytree.js - About 1 hr to fix

            Function top has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    top: function( position, data ) {
                        var within = data.within,
                            withinOffset = within.offset.top + within.scrollTop,
                            outerHeight = within.height,
                            offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
            Severity: Minor
            Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 1 hr to fix

              Function setOffset has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  setOffset: function( elem, options, i ) {
                      var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                          position = jQuery.css( elem, "position" ),
                          curElem = jQuery( elem ),
                          props = {};
              Severity: Minor
              Found in lib/jquery.js - About 1 hr to fix

                Function top has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        top: function( position, data ) {
                            var within = data.within,
                                withinOffset = within.offset.top + within.scrollTop,
                                outerHeight = within.height,
                                offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
                Severity: Minor
                Found in src/jquery-ui-dependencies/jquery-ui.js - About 1 hr to fix

                  Function handlers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      handlers: function( event, handlers ) {
                          var i, handleObj, sel, matchedHandlers, matchedSelectors,
                              handlerQueue = [],
                              delegateCount = handlers.delegateCount,
                              cur = event.target;
                  Severity: Minor
                  Found in lib/jquery.js - About 1 hr to fix

                    Function before has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          before: function before() {
                            var _this = this;
                      
                            var module = this.module;
                            var notStartedModules = getNotStartedModules(module); // ensure the callbacks are executed serially for each module
                    Severity: Minor
                    Found in lib/qunit.js - About 1 hr to fix

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

                                  } else if (event.ctrlKey) {
                                      // Chrome on Mac: [Control]
                                      res = "link";
                                  } else if (event.metaKey) {
                                      // Mac: [Command]
                      Severity: Major
                      Found in src/jquery.fancytree.dnd5.js and 1 other location - About 1 hr to fix
                      src/jquery.fancytree.dnd5.js on lines 234..243

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

                      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

                                                      $.each(TREE_ATTRS, function (i, attr) {
                                                          if (metaData[attr] !== undefined) {
                                                              tree[attr] = metaData[attr];
                                                              delete metaData[attr];
                                                          }
                      Severity: Major
                      Found in src/jquery.fancytree.js and 1 other location - About 1 hr to fix
                      src/jquery.fancytree.js on lines 4536..4541

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

                      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 (event.ctrlKey) {
                                      // Windows: [Ctrl]
                                      res = "copy";
                                  } else if (event.shiftKey) {
                                      // Windows: [Shift]
                      Severity: Major
                      Found in src/jquery.fancytree.dnd5.js and 1 other location - About 1 hr to fix
                      src/jquery.fancytree.dnd5.js on lines 223..232

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

                      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

                                                  $.each(TREE_ATTRS, function (i, attr) {
                                                      if (metaData[attr] !== undefined) {
                                                          tree[attr] = metaData[attr];
                                                          delete metaData[attr];
                                                      }
                      Severity: Major
                      Found in src/jquery.fancytree.js and 1 other location - About 1 hr to fix
                      src/jquery.fancytree.js on lines 6094..6099

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

                      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 (
                                  !opts.traceEvents ||
                                  (opts.traceEvents !== true && $.inArray(name, opts.traceEvents) < 0)
                              ) {
                                  return self._super.apply(self, arguments);
                      Severity: Major
                      Found in src/jquery.fancytree.logger.js and 1 other location - About 1 hr to fix
                      src/jquery.fancytree.logger.js on lines 115..120

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

                      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 (
                                  !opts.traceHooks ||
                                  (opts.traceHooks !== true && $.inArray(name, opts.traceHooks) < 0)
                              ) {
                                  return this_._superApply.call(this_, args);
                      Severity: Major
                      Found in src/jquery.fancytree.logger.js and 1 other location - About 1 hr to fix
                      src/jquery.fancytree.logger.js on lines 85..90

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

                      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 ( ( !support.boxSizingReliable() && isBorderBox ||
                      
                              // Support: IE 10 - 11+, Edge 15 - 18+
                              // IE/Edge misreport `getComputedStyle` of table rows with width/height
                              // set in CSS while `offset*` properties report correct values.
                      Severity: Critical
                      Found in lib/jquery.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language