mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
    var i = 0,
        len = elems.length,
        bulk = key == null;

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

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

        function updateItemDetails(key) {
            $("#tmplDetails").addClass("busy");
            $.bbq.pushState({ key: key });
    
            $.when(
    Severity: Minor
    Found in demo/taxonomy-browser/taxonomy-browser.js - About 1 hr to fix

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

          stop: function( type, clearQueue, gotoEnd ) {
              var stopQueue = function( hooks ) {
                  var stop = hooks.stop;
                  delete hooks.stop;
                  stop( gotoEnd );
      Severity: Minor
      Found in lib/jquery.js - About 1 hr to fix

        Function findNeighbourTd has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function findNeighbourTd(tree, $target, keyCode) {
                var nextNode,
                    node,
                    navMap = { "ctrl+home": "first", "ctrl+end": "last" },
                    $td = $target.closest("td"),
        Severity: Minor
        Found in src/jquery.fancytree.ariagrid.js - About 1 hr to fix

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

                      nodeClick: function (ctx) {
                          var activate,
                              expand,
                              // event = ctx.originalEvent,
                              targetType = ctx.targetType,
          Severity: Minor
          Found in src/jquery.fancytree.js - About 1 hr to fix

            Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function on( elem, types, selector, data, fn, one ) {
                var origFn, type;
            
                // Types can be a map of types/handlers
                if ( typeof types === "object" ) {
            Severity: Minor
            Found in lib/jquery.js - About 1 hr to fix

              Function toggleClass has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  toggleClass: function( value, stateVal ) {
                      var type = typeof value,
                          isValidValue = type === "string" || Array.isArray( value );
              
                      if ( typeof stateVal === "boolean" && isValidValue ) {
              Severity: Minor
              Found in lib/jquery.js - About 1 hr to fix

                Function keyEvent has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    keyEvent: function( type, options ) {
                        var event;
                        options = $.extend({
                            bubbles: true,
                            cancelable: true,
                Severity: Minor
                Found in lib/jquery.simulate.js - About 1 hr to fix

                  Function prettyYamlValue has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function prettyYamlValue(value) {
                        var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
                    
                        if (value === undefined) {
                          // Not supported in JSON/YAML, turn into string
                  Severity: Minor
                  Found in lib/qunit.js - About 1 hr to fix

                    Function _log has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _log: function(args) {
                                var $this = $(this),
                                    data = $this.data("jsconsole"),
                                    level = arguments[0],
                                    levelName = LEVEL_NAMES[level],
                    Severity: Minor
                    Found in lib/jquery.jsconsole.js - About 1 hr to fix

                      Function StringMap has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var StringMap = typeof g.Map === 'function' && typeof g.Map.prototype.keys === 'function' && typeof g.Symbol === 'function' && _typeof(g.Symbol.iterator) === 'symbol' ? g.Map : function StringMap(input) {
                            var _this = this;
                        
                            var store = Object.create(null);
                            var hasOwn = Object.prototype.hasOwnProperty;
                      Severity: Minor
                      Found in lib/qunit.js - About 1 hr to fix

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

                                debug: function (msg) {
                                    if (this.options.debugLevel >= 4) {
                                        Array.prototype.unshift.call(arguments, this.toString());
                                        consoleApply("log", arguments);
                                    }
                        Severity: Major
                        Found in src/jquery.fancytree.js and 3 other locations - About 1 hr to fix
                        src/jquery.fancytree.js on lines 3143..3148
                        src/jquery.fancytree.js on lines 3503..3508
                        src/jquery.fancytree.js on lines 4033..4038

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

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

                                error: function (msg) {
                                    if (this.options.debugLevel >= 1) {
                                        Array.prototype.unshift.call(arguments, this.toString());
                                        consoleApply("error", arguments);
                                    }
                        Severity: Major
                        Found in src/jquery.fancytree.js and 3 other locations - About 1 hr to fix
                        src/jquery.fancytree.js on lines 3092..3097
                        src/jquery.fancytree.js on lines 3503..3508
                        src/jquery.fancytree.js on lines 4033..4038

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

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

                                info: function (msg) {
                                    if (this.options.debugLevel >= 3) {
                                        Array.prototype.unshift.call(arguments, this.toString());
                                        consoleApply("info", arguments);
                                    }
                        Severity: Major
                        Found in src/jquery.fancytree.js and 3 other locations - About 1 hr to fix
                        src/jquery.fancytree.js on lines 3092..3097
                        src/jquery.fancytree.js on lines 3143..3148
                        src/jquery.fancytree.js on lines 4033..4038

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

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

                                warn: function (msg) {
                                    if (this.options.debugLevel >= 2) {
                                        Array.prototype.unshift.call(arguments, this.toString());
                                        consoleApply("warn", arguments);
                                    }
                        Severity: Major
                        Found in src/jquery.fancytree.js and 3 other locations - About 1 hr to fix
                        src/jquery.fancytree.js on lines 3092..3097
                        src/jquery.fancytree.js on lines 3143..3148
                        src/jquery.fancytree.js on lines 3503..3508

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

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

                            function autoScroll(tree, event) {
                                var spOfs,
                                    scrollTop,
                                    delta,
                                    dndOpts = tree.options.dnd5,
                        Severity: Minor
                        Found in src/jquery.fancytree.dnd5.js - About 1 hr to fix

                          Function rejects has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  value: function rejects(promise, expected, message) {
                                    var _validateExpectedExce3 = validateExpectedExceptionArgs(expected, message, 'rejects');
                            
                                    var _validateExpectedExce4 = _slicedToArray(_validateExpectedExce3, 2);
                            
                          Severity: Minor
                          Found in lib/qunit.js - About 1 hr to fix

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

                                        if (typeof options.expires === 'number') {
                                            var days = options.expires, t = options.expires = new Date();
                                            t.setDate(t.getDate() + days);
                                        }
                            Severity: Major
                            Found in lib/Super-Theme-Switcher/jquery.themeswitcher.js and 1 other location - About 1 hr to fix
                            lib/jquery.cookie.js on lines 44..47

                            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

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

                                        if (typeof options.expires === 'number') {
                                            var days = options.expires, t = options.expires = new Date();
                                            t.setDate(t.getDate() + days);
                                        }
                            Severity: Major
                            Found in lib/jquery.cookie.js and 1 other location - About 1 hr to fix
                            lib/Super-Theme-Switcher/jquery.themeswitcher.js on lines 440..443

                            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

                            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 4927..4933

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language