mar10/fancytree

View on GitHub

Showing 460 of 700 total issues

Function publish has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

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

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function normalizeDragEnterResponse has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function normalizeDragEnterResponse(r) {
        var res;

        if (!r) {
            return false;
Severity: Minor
Found in src/jquery.fancytree.dnd5.js - About 1 hr to fix

    Function _makeVirtualFunction has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _makeVirtualFunction(methodName, tree, base, extension, extName) {
            // $.ui.fancytree.debug("_makeVirtualFunction", methodName, tree, base, extension, extName);
            // if(rexTestSuper && !rexTestSuper.test(func)){
            //     // extension.methodName() doesn't call _super(), so no wrapper required
            //     return func;
    Severity: Minor
    Found in src/jquery.fancytree.js - About 1 hr to fix

      Function getDimensions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function getDimensions( elem ) {
              var raw = elem[ 0 ];
              if ( raw.nodeType === 9 ) {
                  return {
                      width: elem.width(),
      Severity: Minor
      Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 1 hr to fix

        Function getDimensions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function getDimensions( elem ) {
            var raw = elem[ 0 ];
            if ( raw.nodeType === 9 ) {
                return {
                    width: elem.width(),
        Severity: Minor
        Found in src/jquery-ui-dependencies/jquery-ui.js - About 1 hr to fix

          Function getDimensions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function getDimensions( elem ) {
              var raw = elem[ 0 ];
              if ( raw.nodeType === 9 ) {
                  return {
                      width: elem.width(),
          Severity: Minor
          Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 1 hr to fix

            Function when has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                when: function( singleValue ) {
                    var
            
                        // count of uncompleted subordinates
                        remaining = arguments.length,
            Severity: Minor
            Found in lib/jquery.js - About 1 hr to fix

              Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function propFilter( props, specialEasing ) {
                  var index, name, easing, value, hooks;
              
                  // camelCase, specialEasing and expand cssHook pass
                  for ( index in props ) {
              Severity: Minor
              Found in lib/jquery.js - About 1 hr to fix

                Function logHook has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function logHook(name, this_, args, extra) {
                        var res,
                            ctx = args[0],
                            opts = ctx.options.logger,
                            obj = ctx.node || ctx.tree,
                Severity: Minor
                Found in src/jquery.fancytree.logger.js - About 1 hr to fix

                  Function postProcess has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              postProcess: function (event, data) {
                                  var response = data.response;
                  
                                  data.node.info("search postProcess", response);
                                  data.result = $.map(response.results, function (o) {
                  Severity: Minor
                  Found in demo/taxonomy-browser/taxonomy-browser.js - About 1 hr to fix

                    Function clone has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                            var i, l, srcElements, destElements,
                                clone = elem.cloneNode( true ),
                                inPage = isAttached( elem );
                    
                    
                    Severity: Minor
                    Found in lib/jquery.js - About 1 hr to fix

                      Function renderColumns has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  renderColumns: function (event, data) {
                                      var i,
                                          node = data.node,
                                          $tdList = $(node.tr).find(">td"),
                                          cnList = node.data.vernacularNames
                      Severity: Minor
                      Found in demo/taxonomy-browser/taxonomy-browser.js - About 1 hr to fix

                        Function addClass has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            addClass: function( value ) {
                                var classes, elem, cur, curValue, clazz, j, finalValue,
                                    i = 0;
                        
                                if ( isFunction( value ) ) {
                        Severity: Minor
                        Found in lib/jquery.js - About 1 hr to fix

                          Function exportQUnit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function exportQUnit(QUnit) {
                                var exportedModule = false;
                            
                                if (window$1 && document) {
                                  // QUnit may be defined when it is preconfigured but then only QUnit and QUnit.config may be defined.
                          Severity: Minor
                          Found in lib/qunit.js - About 1 hr to fix

                            Function position has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                position: function() {
                                    if ( !this[ 0 ] ) {
                                        return;
                                    }
                            
                            
                            Severity: Minor
                            Found in lib/jquery.js - About 1 hr to fix

                              Function queueHook has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    queueHook: function queueHook(hook, hookName, hookOwner) {
                                      var _this3 = this;
                                
                                      var callHook = function callHook() {
                                        var promise = hook.call(_this3.testEnvironment, _this3.assert);
                              Severity: Minor
                              Found in lib/qunit.js - About 1 hr to fix

                                Function objectType has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function objectType(obj) {
                                      if (typeof obj === 'undefined') {
                                        return 'undefined';
                                      } // Consider: typeof null === object
                                  
                                Severity: Minor
                                Found in lib/qunit.js - About 1 hr to fix

                                  Function simulateDrag has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      simulateDrag: function() {
                                          var i = 0,
                                              target = this.target,
                                              eventDoc = target.ownerDocument,
                                              options = this.options,
                                  Severity: Minor
                                  Found in lib/jquery.simulate.js - About 1 hr to fix

                                    Function findNextNode has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            findNextNode: function (match, startNode) {
                                                //, visibleOnly) {
                                                var res = null,
                                                    firstNode = this.getFirstChild();
                                    
                                    
                                    Severity: Minor
                                    Found in src/jquery.fancytree.js - About 1 hr to fix

                                      Function applyPatch has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              applyPatch: function (patchList) {
                                                  var dfd,
                                                      i,
                                                      p2,
                                                      key,
                                      Severity: Minor
                                      Found in src/jquery.fancytree.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language