mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

Function nodeRender has 132 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            nodeRender: function (ctx, force, deep, collapsed, _recursive) {
                /* This method must take care of all cases where the current data mode
                 * (i.e. node hierarchy) does not match the current markup.
                 *
                 * - node was not yet rendered:
Severity: Major
Found in src/jquery.fancytree.js - About 5 hrs to fix

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

            treeInit: function (ctx) {
                var i,
                    columnCount,
                    n,
                    $row,
    Severity: Major
    Found in src/jquery.fancytree.grid.js - About 5 hrs to fix

      Function handleDragOver has 129 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function handleDragOver(event, data) {
              // Implement auto-scrolling
              if (data.options.dnd5.scroll) {
                  autoScroll(data.tree, event);
              }
      Severity: Major
      Found in src/jquery.fancytree.dnd5.js - About 5 hrs to fix

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

            function _delay(tag, ms, callback) {
                /*jshint -W040:true */
                var self = this;
        
                tag = "" + (tag || "default");
        Severity: Major
        Found in demo/taxonomy-browser/taxonomy-browser.js and 1 other location - About 5 hrs to fix
        demo/taxonomy-browser/taxonomy-browser-itis.js on lines 61..79

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

        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

            function _delay(tag, ms, callback) {
                /*jshint -W040:true */
                var self = this;
        
                tag = "" + (tag || "default");
        Severity: Major
        Found in demo/taxonomy-browser/taxonomy-browser-itis.js and 1 other location - About 5 hrs to fix
        demo/taxonomy-browser/taxonomy-browser.js on lines 74..92

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

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

                      var p = new Promise(function (resolve, reject) {
                        if (search == 'farzher') return resolve([{
                          target: "farzher was here (^-^*)/",
                          score: 0,
                          indexes: [0, 1, 2, 3, 4, 5, 6],
        Severity: Major
        Found in lib/qunit.js - About 5 hrs to fix

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

                  treeInit: function (ctx) {
                      var tree = ctx.tree,
                          opts = ctx.options,
                          local = this._local,
                          instOpts = this.options.persist;
          Severity: Major
          Found in src/jquery.fancytree.persist.js - About 4 hrs to fix

            Function defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function defaultPrefilter( elem, props, opts ) {
                var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
                    isBox = "width" in props || "height" in props,
                    anim = this,
                    orig = {},
            Severity: Major
            Found in lib/jquery.js - About 4 hrs to fix

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

                      treeDestroy: function (ctx) {
                          var tree = ctx.tree,
                              $table = tree.widget.element,
                              $wrapper = this.$fixedWrapper,
                              fcn = this.options.fixed.classNames;
              Severity: Major
              Found in src/jquery.fancytree.fixed.js and 1 other location - About 4 hrs to fix
              src/jquery.fancytree.fixed.js on lines 500..512

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

              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

                      treeClear: function (ctx) {
                          var tree = ctx.tree,
                              $table = tree.widget.element,
                              $wrapper = this.$fixedWrapper,
                              fcn = this.options.fixed.classNames;
              Severity: Major
              Found in src/jquery.fancytree.fixed.js and 1 other location - About 4 hrs to fix
              src/jquery.fancytree.fixed.js on lines 518..530

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

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

                      scrollIntoView: function (effects, options) {
                          if (options !== undefined && _isNode(options)) {
                              throw Error(
                                  "scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead."
                              );
              Severity: Major
              Found in src/jquery.fancytree.js - About 4 hrs to fix

                Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                jQuery.Callbacks = function( options ) {
                
                    // Convert options from String-formatted to Object-formatted if needed
                    // (we check in cache first)
                    options = typeof options === "string" ?
                Severity: Major
                Found in lib/jquery.js - About 4 hrs to fix

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

                      $.cleanData = ( function( orig ) {
                          return function( elems ) {
                              var events, elem, i;
                              for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
                  
                  
                  Severity: Major
                  Found in src/jquery-ui-dependencies/jquery-ui-iife.js and 1 other location - About 4 hrs to fix
                  src/jquery-ui-dependencies/jquery-ui.js on lines 46..59

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

                  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

                  $.cleanData = ( function( orig ) {
                      return function( elems ) {
                          var events, elem, i;
                          for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
                  
                  
                  Severity: Major
                  Found in src/jquery-ui-dependencies/jquery-ui.js and 1 other location - About 4 hrs to fix
                  src/jquery-ui-dependencies/jquery-ui-iife.js on lines 37..50

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

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

                      var SuiteReport = /*#__PURE__*/function () {
                        function SuiteReport(name, parentSuite) {
                          _classCallCheck(this, SuiteReport);
                    
                          this.name = name;
                  Severity: Major
                  Found in lib/qunit.js - About 4 hrs to fix

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

                        if ( !$.fn.even || !$.fn.odd ) {
                            $.fn.extend( {
                                even: function() {
                                    return this.filter( function( i ) {
                                        return i % 2 === 0;
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery-ui-iife.js and 2 other locations - About 4 hrs to fix
                    src/jquery-ui-dependencies/jquery-ui.js on lines 1324..1337
                    src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1324..1337

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

                    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 ( !$.fn.even || !$.fn.odd ) {
                        $.fn.extend( {
                            even: function() {
                                return this.filter( function( i ) {
                                    return i % 2 === 0;
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery-ui.js and 2 other locations - About 4 hrs to fix
                    src/jquery-ui-dependencies/jquery-ui-iife.js on lines 1315..1328
                    src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1324..1337

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

                    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 ( !$.fn.even || !$.fn.odd ) {
                        $.fn.extend( {
                            even: function() {
                                return this.filter( function( i ) {
                                    return i % 2 === 0;
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js and 2 other locations - About 4 hrs to fix
                    src/jquery-ui-dependencies/jquery-ui-iife.js on lines 1315..1328
                    src/jquery-ui-dependencies/jquery-ui.js on lines 1324..1337

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

                    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

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

                    /*!
                     *
                     * jquery.fancytree.clones.js
                     * Support faster lookup of nodes by key and shared ref-ids.
                     * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
                    Severity: Minor
                    Found in src/jquery.fancytree.clones.js - About 4 hrs to fix

                      Function step has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      function step() {
                                        if (canceled) return reject('canceled');
                                        var startMs = Date.now(); // This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]
                                        // options.keys
                        
                      Severity: Major
                      Found in lib/qunit.js - About 4 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language