mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

Function CHILD has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        "CHILD": function( type, what, _argument, first, last ) {
            var simple = type.slice( 0, 3 ) !== "nth",
                forward = type.slice( -4 ) !== "last",
                ofType = what === "of-type";

Severity: Major
Found in lib/jquery.js - About 3 hrs to fix

    Function Sizzle has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Sizzle( selector, context, results, seed ) {
        var m, i, elem, nid, match, groups, newSelector,
            newContext = context && context.ownerDocument,
    
            // nodeType defaults to 9, since context defaults to document
    Severity: Major
    Found in lib/jquery.js - About 3 hrs to fix

      Function treeInit has 80 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              treeInit: function (ctx) {
                  var $tdFirst,
                      $ul,
                      tree = ctx.tree,
                      $table = tree.widget.element;
      Severity: Major
      Found in src/jquery.fancytree.columnview.js - About 3 hrs to fix

        Function widget has 77 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.widget = function( name, base, prototype ) {
                var existingConstructor, constructor, basePrototype;
        
                // ProxiedPrototype allows the provided prototype to remain unmodified
                // so that it can be used as a mixin for multiple widgets (#8876)
        Severity: Major
        Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 3 hrs to fix

          Function widget has 77 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          $.widget = $.widget || function( name, base, prototype ) {
              var existingConstructor, constructor, basePrototype;
          
              // ProxiedPrototype allows the provided prototype to remain unmodified
              // so that it can be used as a mixin for multiple widgets (#8876)
          Severity: Major
          Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 3 hrs to fix

            Function setViewport has 77 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $.ui.fancytree._FancytreeClass.prototype.setViewport = function (opts) {
                    if (typeof opts === "boolean") {
                        this.debug("setViewport( " + opts + ")");
                        return this.setViewport({ enabled: opts });
                    }
            Severity: Major
            Found in src/jquery.fancytree.grid.js - About 3 hrs to fix

              Function send has 77 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          send: function( headers, complete ) {
                              var i,
                                  xhr = options.xhr();
              
                              xhr.open(
              Severity: Major
              Found in lib/jquery.js - About 3 hrs to fix

                Function widget has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.widget = function( name, base, prototype ) {
                    var existingConstructor, constructor, basePrototype;
                
                    // ProxiedPrototype allows the provided prototype to remain unmodified
                    // so that it can be used as a mixin for multiple widgets (#8876)
                Severity: Major
                Found in src/jquery-ui-dependencies/jquery-ui.js - About 3 hrs to fix

                  File taxonomy-browser-itis.js has 295 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*!
                   * Fancytree Taxonomy Browser
                   *
                   * Copyright (c) 2015, Martin Wendt (https://wwWendt.de)
                   *
                  Severity: Minor
                  Found in demo/taxonomy-browser/taxonomy-browser-itis.js - About 3 hrs to fix

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

                            nodeSetActive: function (ctx, flag, callOpts) {
                                var res,
                                    local = this._local;
                    
                                flag = flag !== false;
                    Severity: Major
                    Found in src/jquery.fancytree.persist.js and 1 other location - About 3 hrs to fix
                    src/jquery.fancytree.persist.js on lines 466..480

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

                    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

                            nodeSetFocus: function (ctx, flag) {
                                var res,
                                    local = this._local;
                    
                                flag = flag !== false;
                    Severity: Major
                    Found in src/jquery.fancytree.persist.js and 1 other location - About 3 hrs to fix
                    src/jquery.fancytree.persist.js on lines 438..452

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

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

                                nodeSetActive: function (ctx, flag, callOpts) {
                                    // Handle user click / [space] / [enter], according to clickFolderMode.
                                    callOpts = callOpts || {};
                                    var subCtx,
                                        node = ctx.node,
                    Severity: Major
                    Found in src/jquery.fancytree.js - About 3 hrs to fix

                      Function _setDndStatus has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              _setDndStatus: function (
                                  sourceNode,
                                  targetNode,
                                  helper,
                                  hitMode,
                      Severity: Major
                      Found in src/jquery.fancytree.dnd.js - About 3 hrs to fix

                        Function treeInit has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                treeInit: function (ctx) {
                                    var tree = ctx.tree,
                                        treeOpts = ctx.options,
                                        opts = treeOpts.ariagrid;
                        
                        
                        Severity: Major
                        Found in src/jquery.fancytree.ariagrid.js - About 2 hrs to fix

                          Function editStart has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              $.ui.fancytree._FancytreeNodeClass.prototype.editStart = function () {
                                  var $input,
                                      node = this,
                                      tree = this.tree,
                                      local = tree.ext.edit,
                          Severity: Major
                          Found in src/jquery.fancytree.edit.js - About 2 hrs to fix

                            File jquery.fancytree.edit.js has 290 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /*!
                             * jquery.fancytree.edit.js
                             *
                             * Make node titles editable.
                             * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
                            Severity: Minor
                            Found in src/jquery.fancytree.edit.js - About 2 hrs to fix

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

                                          getPrepared: function getPrepared(target) {
                                            if (target.length > 999) return fuzzysort.prepare(target); // don't cache huge targets
                                
                                            var targetPrepared = preparedCache.get(target);
                                            if (targetPrepared !== undefined) return targetPrepared;
                              Severity: Major
                              Found in lib/qunit.js and 1 other location - About 2 hrs to fix
                              lib/qunit.js on lines 5168..5176

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

                              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

                                          getPreparedSearch: function getPreparedSearch(search) {
                                            if (search.length > 999) return fuzzysort.prepareSearch(search); // don't cache huge searches
                                
                                            var searchPrepared = preparedSearchCache.get(search);
                                            if (searchPrepared !== undefined) return searchPrepared;
                              Severity: Major
                              Found in lib/qunit.js and 1 other location - About 2 hrs to fix
                              lib/qunit.js on lines 5159..5167

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

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

                                          drag: function (event, ui) {
                                              var ctx,
                                                  isHelper,
                                                  logObject,
                                                  // 'draggable' was renamed to 'ui-draggable' since jQueryUI 1.10
                              Severity: Major
                              Found in src/jquery.fancytree.dnd.js - About 2 hrs to fix

                                Function matcherFromGroupMatchers has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                                    var bySet = setMatchers.length > 0,
                                        byElement = elementMatchers.length > 0,
                                        superMatcher = function( seed, context, xml, results, outermost ) {
                                            var elem, j, matcher,
                                Severity: Major
                                Found in lib/jquery.js - About 2 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language