mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
    $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
        if ( typeof options === "string" ) {
            options = { effect: options };
        }
Severity: Major
Found in src/jquery-ui-dependencies/jquery-ui.js and 2 other locations - About 2 days to fix
src/jquery-ui-dependencies/jquery-ui-iife.js on lines 713..754
src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 722..763

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

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

$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
    $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
        if ( typeof options === "string" ) {
            options = { effect: options };
        }
Severity: Major
Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js and 2 other locations - About 2 days to fix
src/jquery-ui-dependencies/jquery-ui-iife.js on lines 713..754
src/jquery-ui-dependencies/jquery-ui.js on lines 722..763

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

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

    $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
        $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
            if ( typeof options === "string" ) {
                options = { effect: options };
            }
Severity: Major
Found in src/jquery-ui-dependencies/jquery-ui-iife.js and 2 other locations - About 2 days to fix
src/jquery-ui-dependencies/jquery-ui.js on lines 722..763
src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 722..763

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

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.dnd5.js has 773 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jquery.fancytree.dnd5.js
 *
 * Drag-and-drop support (native HTML5).
 * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
Severity: Major
Found in src/jquery.fancytree.dnd5.js - About 1 day to fix

    Function themeswitcher has 359 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn.themeswitcher = function( options ) {
            var switcherDiv = this, switcherOptions = {};
            var settings = {
                loadtheme : "",
                height: 200,
    Severity: Major
    Found in lib/Super-Theme-Switcher/jquery.themeswitcher.js - About 1 day to fix

      Function Assert has 330 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var Assert = /*#__PURE__*/function () {
            function Assert(testContext) {
              _classCallCheck(this, Assert);
        
              this.test = testContext;
      Severity: Major
      Found in lib/qunit.js - About 1 day to fix

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

        /*!
         * jquery.fancytree.grid.js
         *
         * Render tree as table (aka 'tree grid', 'table tree').
         * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
        Severity: Major
        Found in src/jquery.fancytree.grid.js - About 1 day to fix

          Function nodeLoadChildren has 279 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      nodeLoadChildren: function (ctx, source) {
                          var ajax,
                              delay,
                              ajaxDfd = null,
                              resultDfd,
          Severity: Major
          Found in src/jquery.fancytree.js - About 1 day to fix

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

            /*!
             * jquery.fancytree.dnd.js
             *
             * Drag-and-drop support (jQuery UI draggable/droppable).
             * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
            Severity: Major
            Found in src/jquery.fancytree.dnd.js - About 1 day to fix

              Function setDocument has 262 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              setDocument = Sizzle.setDocument = function( node ) {
                  var hasCompare, subWindow,
                      doc = node ? node.ownerDocument || node : preferredDoc;
              
                  // Return early if doc is invalid or already selected
              Severity: Major
              Found in lib/jquery.js - About 1 day to fix

                Function ajax has 259 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    ajax: function( url, options ) {
                
                        // If url is an object, simulate pre-1.5 signature
                        if ( typeof url === "object" ) {
                            options = url;
                Severity: Major
                Found in lib/jquery.js - About 1 day to fix

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

                      $.widget.extend = function( target ) {
                          var input = widgetSlice.call( arguments, 1 );
                          var inputIndex = 0;
                          var inputLength = input.length;
                          var key;
                  Severity: Major
                  Found in src/jquery-ui-dependencies/jquery-ui-iife.js and 2 other locations - About 1 day to fix
                  src/jquery-ui-dependencies/jquery-ui.js on lines 191..219
                  src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 191..219

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

                  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

                  $.widget.extend = function( target ) {
                      var input = widgetSlice.call( arguments, 1 );
                      var inputIndex = 0;
                      var inputLength = input.length;
                      var key;
                  Severity: Major
                  Found in src/jquery-ui-dependencies/jquery-ui.js and 2 other locations - About 1 day to fix
                  src/jquery-ui-dependencies/jquery-ui-iife.js on lines 182..210
                  src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 191..219

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

                  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

                  $.widget.extend = function( target ) {
                      var input = widgetSlice.call( arguments, 1 );
                      var inputIndex = 0;
                      var inputLength = input.length;
                      var key;
                  Severity: Major
                  Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js and 2 other locations - About 1 day to fix
                  src/jquery-ui-dependencies/jquery-ui-iife.js on lines 182..210
                  src/jquery-ui-dependencies/jquery-ui.js on lines 191..219

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

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

                      var scrollParent = $.fn.scrollParent = function( includeHidden ) {
                          var position = this.css( "position" ),
                              excludeStaticParent = position === "absolute",
                              overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
                              scrollParent = this.parents().filter( function() {
                  Severity: Major
                  Found in src/jquery-ui-dependencies/jquery-ui-iife.js and 2 other locations - About 1 day to fix
                  src/jquery-ui-dependencies/jquery-ui.js on lines 1390..1406
                  src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1390..1406

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

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

                  var scrollParent = $.fn.scrollParent = function( includeHidden ) {
                      var position = this.css( "position" ),
                          excludeStaticParent = position === "absolute",
                          overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
                          scrollParent = this.parents().filter( function() {
                  Severity: Major
                  Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js and 2 other locations - About 1 day to fix
                  src/jquery-ui-dependencies/jquery-ui-iife.js on lines 1381..1397
                  src/jquery-ui-dependencies/jquery-ui.js on lines 1390..1406

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

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

                  var scrollParent = $.fn.scrollParent = function( includeHidden ) {
                      var position = this.css( "position" ),
                          excludeStaticParent = position === "absolute",
                          overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
                          scrollParent = this.parents().filter( function() {
                  Severity: Major
                  Found in src/jquery-ui-dependencies/jquery-ui.js and 2 other locations - About 1 day to fix
                  src/jquery-ui-dependencies/jquery-ui-iife.js on lines 1381..1397
                  src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1390..1406

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

                  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.fixed.js has 550 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*!
                   * jquery.fancytree.fixed.js
                   *
                   * Add fixed colums and headers to ext.table.
                   * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
                  Severity: Major
                  Found in src/jquery.fancytree.fixed.js - About 1 day to fix

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

                    /*!
                     * jquery.fancytree.ariagrid.js
                     *
                     * Support ARIA compliant markup and keyboard navigation for tree grids with
                     * embedded input controls.
                    Severity: Major
                    Found in src/jquery.fancytree.ariagrid.js - About 1 day to fix

                      Function _onDragEvent has 224 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              _onDragEvent: function (
                                  eventName,
                                  node,
                                  otherNode,
                                  event,
                      Severity: Major
                      Found in src/jquery.fancytree.dnd.js - About 1 day to fix
                        Severity
                        Category
                        Status
                        Source
                        Language