mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

                if (!node) {
                    tree.debug(
                        "Ignore non-node " +
                            event.type +
                            ": " +
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 827..837

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

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

                case "expand":
                    this.tree.timer = setTimeout(function () {
                        self.tree.debug("setTimeout: trigger expand");
                        self.setExpanded(true);
                    }, ms);
Severity: Major
Found in src/jquery.fancytree.js and 1 other location - About 1 hr to fix
src/jquery.fancytree.js on lines 2082..2087

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

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

        findNextNode: function (match, startNode) {
            //, visibleOnly) {
            var res = null,
                firstNode = this.getFirstChild();

Severity: Minor
Found in src/jquery.fancytree.js - About 1 hr to fix

    Function applyPatch has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            applyPatch: function (patchList) {
                var dfd,
                    i,
                    p2,
                    key,
    Severity: Minor
    Found in src/jquery.fancytree.js - About 1 hr to fix

      Function eventToString has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  eventToString: function (event) {
                      // Poor-man's hotkeys. See here for a complete implementation:
                      //   https://github.com/jeresig/jquery.hotkeys
                      var which = event.which,
                          et = event.type,
      Severity: Minor
      Found in src/jquery.fancytree.js - About 1 hr to fix

        Function renderLevelCss has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function renderLevelCss(
                containerId,
                depth,
                levelOfs,
                lineOfs,
        Severity: Minor
        Found in src/jquery.fancytree.wide.js - About 1 hr to fix

          Function remove has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              remove: function( owner, key ) {
                  var i,
                      cache = owner[ this.expando ];
          
                  if ( cache === undefined ) {
          Severity: Minor
          Found in lib/jquery.js - About 1 hr to fix

            Function run has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  run: function run() {
                    config.current = this;
              
                    if (config.notrycatch) {
                      runTest(this);
            Severity: Minor
            Found in lib/qunit.js - About 1 hr to fix

              Function decycledShallowClone has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function decycledShallowClone(object) {
                    var ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
                
                    if (ancestors.indexOf(object) !== -1) {
                      return '[Circular]';
              Severity: Minor
              Found in lib/qunit.js - About 1 hr to fix

                Function _checkBrowser has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function _checkBrowser(){
                        var matched, browser;
                        function uaMatch( ua ) {
                            ua = ua.toLowerCase();
                            var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
                Severity: Minor
                Found in lib/contextmenu-abs/jquery.contextMenu-custom.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                                      if (
                                          hitMode !== "before" &&
                                          hitMode !== "after" &&
                                          dnd.autoExpandMS &&
                                          node.hasChildren() !== false &&
                  Severity: Major
                  Found in src/jquery.fancytree.dnd.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if ( support.matchesSelector && documentIsHTML &&
                            !nonnativeSelectorCache[ expr + " " ] &&
                            ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
                            ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
                    
                    
                    Severity: Major
                    Found in lib/jquery.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  if (lastequality && (preIns && preDel && postIns && postDel || lastequality.length < 2 && preIns + preDel + postIns + postDel === 3)) {
                                    // Duplicate record.
                                    diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]); // Change second copy to insert.
                        
                                    diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;
                      Severity: Major
                      Found in lib/qunit.js - About 1 hr to fix

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

                                        if ((e && e.which === $.ui.keyCode.ESCAPE) || query === "") {
                                            $("#btnResetSearch").trigger("click");
                                            return;
                                        }
                        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 476..479

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

                        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 ((e && e.which === $.ui.keyCode.ESCAPE) || query === "") {
                                            $("#btnResetSearch").trigger("click");
                                            return;
                                        }
                        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 358..361

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

                        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

                                    cssText = renderLevelCss(
                                        containerId,
                                        this._local.maxDepth,
                                        this._local.levelOfs,
                                        this._local.lineOfs,
                        Severity: Major
                        Found in src/jquery.fancytree.wide.js and 1 other location - About 1 hr to fix
                        src/jquery.fancytree.wide.js on lines 238..245

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

                        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

                                debugTimeEnd: function (label) {
                                    if (this.options.debugLevel >= 4) {
                                        window.console.timeEnd(this + " - " + label);
                                    }
                                },
                        Severity: Major
                        Found in src/jquery.fancytree.js and 1 other location - About 1 hr to fix
                        src/jquery.fancytree.js on lines 3828..3832

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

                        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

                                        } else if( BROWSER.msie ) {
                                            $('#' + o.menu).each( function() { $(this).bind('selectstart.disableTextSelect', function() { return false; }); });
                                        } else {
                        Severity: Major
                        Found in lib/contextmenu-abs/jquery.contextMenu-custom.js and 1 other location - About 1 hr to fix
                        lib/contextmenu-abs/jquery.contextMenu-custom.js on lines 181..183

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

                        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

                                        cssText = renderLevelCss(
                                            containerId,
                                            this._local.maxDepth,
                                            this._local.levelOfs,
                                            this._local.lineOfs,
                        Severity: Major
                        Found in src/jquery.fancytree.wide.js and 1 other location - About 1 hr to fix
                        src/jquery.fancytree.wide.js on lines 207..214

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

                        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

                                        } else {
                                            $('#' + o.menu).each(function() { $(this).bind('mousedown.disableTextSelect', function() { return false; }); });
                                        }
                        Severity: Major
                        Found in lib/contextmenu-abs/jquery.contextMenu-custom.js and 1 other location - About 1 hr to fix
                        lib/contextmenu-abs/jquery.contextMenu-custom.js on lines 179..181

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

                        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