mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

Function onDropEvent has 222 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function onDropEvent(event) {
        var json,
            allowAutoExpand,
            nodeData,
            isSourceFtNode,
Severity: Major
Found in src/jquery.fancytree.dnd5.js - About 1 day to fix

    Function publish has 218 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    exports.publish = function(taffyData, opts, tutorials) {
        var classes;
        var conf;
        var externals;
        var files;
    Severity: Major
    Found in bin/jsdoc3-moogle/publish.js - About 1 day to fix

      Function dump has 213 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var dump = (function () {
            function quote(str) {
              return '"' + str.toString().replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"';
            }
        
      Severity: Major
      Found in lib/qunit.js - About 1 day to fix

        File publish.js has 505 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        'use strict';
        
        var doop = require('jsdoc/util/doop');
        var env = require('jsdoc/env');
        var fs = require('jsdoc/fs');
        Severity: Major
        Found in bin/jsdoc3-moogle/publish.js - About 1 day to fix

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

                  treeInit: function (ctx) {
                      this._requireExtension("table", true, true);
                      // 'fixed' requires the table extension to be loaded before itself
          
                      var res = this._superApply(arguments),
          Severity: Major
          Found in src/jquery.fancytree.fixed.js - About 7 hrs to fix

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

                    disableContextMenuItems: function(o) {
                        if( o == undefined ) {
                            // Disable all
                            $(this).find('LI').addClass('disabled');
                            return( $(this) );
            Severity: Major
            Found in lib/contextmenu-abs/jquery.contextMenu-custom.js and 1 other location - About 7 hrs to fix
            lib/contextmenu-abs/jquery.contextMenu-custom.js on lines 211..227

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

            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

                    enableContextMenuItems: function(o) {
                        if( o == undefined ) {
                            // Enable all
                            $(this).find('LI.disabled').removeClass('disabled');
                            return( $(this) );
            Severity: Major
            Found in lib/contextmenu-abs/jquery.contextMenu-custom.js and 1 other location - About 7 hrs to fix
            lib/contextmenu-abs/jquery.contextMenu-custom.js on lines 192..208

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

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

                Deferred: function( func ) {
                    var tuples = [
            
                            // action, add listener, callbacks,
                            // ... .then handlers, argument index, [final state]
            Severity: Major
            Found in lib/jquery.js - About 7 hrs to fix

              Function equiv has 178 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var equiv = (function () {
                    // Value pairs queued for comparison. Used for breadth-first processing order, recursion
                    // detection and avoiding repeated comparison (see below for details).
                    // Elements are { a: val, b: val }.
                    var pairs = [];
              Severity: Major
              Found in lib/qunit.js - About 7 hrs to fix

                Function nodeRenderTitle has 177 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            nodeRenderTitle: function (ctx, title) {
                                // set node connector images, links and text
                                var checkbox,
                                    className,
                                    icon,
                Severity: Major
                Found in src/jquery.fancytree.js - About 7 hrs to fix

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

                          nodeRenderStatus: function (ctx) {
                              var indent,
                                  node = ctx.node,
                                  opts = ctx.options;
                  
                  
                  Severity: Major
                  Found in src/jquery.fancytree.grid.js and 1 other location - About 6 hrs to fix
                  src/jquery.fancytree.table.js on lines 427..442

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

                  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

                          nodeRenderStatus: function (ctx) {
                              var indent,
                                  node = ctx.node,
                                  opts = ctx.options;
                  
                  
                  Severity: Major
                  Found in src/jquery.fancytree.table.js and 1 other location - About 6 hrs to fix
                  src/jquery.fancytree.grid.js on lines 902..917

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

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

                      $.ui.fancytree._FancytreeClass.prototype._applyFilterImpl = function (
                          filter,
                          branchMode,
                          _opts
                      ) {
                  Severity: Major
                  Found in src/jquery.fancytree.filter.js - About 6 hrs to fix

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

                        if ( !$.escapeSelector ) {
                    
                            // CSS string/identifier serialization
                            // https://drafts.csswg.org/cssom/#common-serializing-idioms
                            var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery-ui-iife.js and 2 other locations - About 6 hrs to fix
                    src/jquery-ui-dependencies/jquery-ui.js on lines 1295..1320
                    src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1295..1320

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

                    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

                    if ( !$.escapeSelector ) {
                    
                        // CSS string/identifier serialization
                        // https://drafts.csswg.org/cssom/#common-serializing-idioms
                        var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js and 2 other locations - About 6 hrs to fix
                    src/jquery-ui-dependencies/jquery-ui-iife.js on lines 1286..1311
                    src/jquery-ui-dependencies/jquery-ui.js on lines 1295..1320

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

                    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

                    if ( !$.escapeSelector ) {
                    
                        // CSS string/identifier serialization
                        // https://drafts.csswg.org/cssom/#common-serializing-idioms
                        var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
                    Severity: Major
                    Found in src/jquery-ui-dependencies/jquery-ui.js and 2 other locations - About 6 hrs to fix
                    src/jquery-ui-dependencies/jquery-ui-iife.js on lines 1286..1311
                    src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1295..1320

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

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

                                nodeSetExpanded: function (ctx, flag, callOpts) {
                                    callOpts = callOpts || {};
                                    var _afterLoad,
                                        dfd,
                                        i,
                    Severity: Major
                    Found in src/jquery.fancytree.js - About 6 hrs to fix

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

                                                          case 38: // up
                                                              if( $(menu).find('LI.hover').size() == 0 ) {
                                                                  $(menu).find('LI:last').addClass('hover');
                                                              } else {
                                                                  $(menu).find('LI.hover').removeClass('hover').prevAll('LI:not(.disabled)').eq(0).addClass('hover');
                      Severity: Major
                      Found in lib/contextmenu-abs/jquery.contextMenu-custom.js and 1 other location - About 6 hrs to fix
                      lib/contextmenu-abs/jquery.contextMenu-custom.js on lines 137..144

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

                      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 40: // down
                                                              if( $(menu).find('LI.hover').size() == 0 ) {
                                                                  $(menu).find('LI:first').addClass('hover');
                                                              } else {
                                                                  $(menu).find('LI.hover').removeClass('hover').nextAll('LI:not(.disabled)').eq(0).addClass('hover');
                      Severity: Major
                      Found in lib/contextmenu-abs/jquery.contextMenu-custom.js and 1 other location - About 6 hrs to fix
                      lib/contextmenu-abs/jquery.contextMenu-custom.js on lines 129..136

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

                      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

                      var uniqueId = $.fn.extend( {
                          uniqueId: ( function() {
                              var uuid = 0;
                      
                              return function() {
                      Severity: Major
                      Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js and 1 other location - About 6 hrs to fix
                      src/jquery-ui-dependencies/jquery-ui.js on lines 1424..1444

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

                      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