mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

Function processModule has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function processModule(name, options, executeNow) {
      var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  
      if (typeof options === 'function') {
        executeNow = options;
Severity: Minor
Found in lib/qunit.js - About 1 hr to fix

    Function needsSignature has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    function needsSignature(doclet) {
        var needsSig = false;
    
        // function and class definitions always get a signature
        if (doclet.kind === 'function' || doclet.kind === 'class') {
    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 load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            load: function (forceReload) {
                var res,
                    source,
                    self = this,
                    wasExpanded = this.isExpanded();
    Severity: Minor
    Found in src/jquery.fancytree.js - About 1 hr to fix

      Function findNeighbourTd has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function findNeighbourTd($target, keyCode) {
              var $tr,
                  colIdx,
                  $td = $target.closest("td"),
                  $tdNext = null;
      Severity: Minor
      Found in src/jquery.fancytree.gridnav.js - About 1 hr to fix

        Function nodeClick has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                nodeClick: function (ctx) {
                    var targetType = ctx.targetType,
                        tree = ctx.tree,
                        node = ctx.node,
                        event = ctx.originalEvent,
        Severity: Minor
        Found in src/jquery.fancytree.ariagrid.js - About 1 hr to fix

          Function _makeHookContext has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _makeHookContext: function (obj, originalEvent, extra) {
                      var ctx, tree;
                      if (obj.node !== undefined) {
                          // obj is already a context object
                          if (originalEvent && obj.originalEvent !== originalEvent) {
          Severity: Minor
          Found in src/jquery.fancytree.js - About 1 hr to fix

            Function option has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    option: function( key, value ) {
                        var options = key;
                        var parts;
                        var curOption;
                        var i;
            Severity: Minor
            Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 1 hr to fix

              Function option has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  option: function( key, value ) {
                      var options = key;
                      var parts;
                      var curOption;
                      var i;
              Severity: Minor
              Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 1 hr to fix

                Function option has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    option: function( key, value ) {
                        var options = key;
                        var parts;
                        var curOption;
                        var i;
                Severity: Minor
                Found in src/jquery-ui-dependencies/jquery-ui.js - About 1 hr to fix

                  Function load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jQuery.fn.load = function( url, params, callback ) {
                      var selector, type, response,
                          self = this,
                          off = url.indexOf( " " );
                  
                  
                  Severity: Minor
                  Found in lib/jquery.js - About 1 hr to fix

                    Function pushResult has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          pushResult: function pushResult(resultInfo) {
                            if (this !== config.current) {
                              var message = resultInfo && resultInfo.message || '';
                              var testName = this && this.testName || '';
                              var error = 'Assertion occurred after test finished.\n' + '> Test: ' + testName + '\n' + '> Message: ' + message + '\n';
                    Severity: Minor
                    Found in lib/qunit.js - About 1 hr to fix

                      Function chain has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function chain(has, keys) {
                            var ctx = {
                              has: has,
                              keys: keys
                            };
                      Severity: Minor
                      Found in lib/qunit.js - About 1 hr to fix

                        Function appendSuitesToHeader has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function appendSuitesToHeader(suites) {
                                var i,
                                    suitesLen,
                                    suite,
                                    path,
                        Severity: Minor
                        Found in lib/qunit-composite.js - About 1 hr to fix

                          Function highlight has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      highlight: function highlight(result, hOpen, hClose) {
                                        if (typeof hOpen == 'function') return fuzzysort.highlightCallback(result, hOpen);
                                        if (result === null) return null;
                                        if (hOpen === undefined) hOpen = '<b>';
                                        if (hClose === undefined) hClose = '</b>';
                          Severity: Minor
                          Found in lib/qunit.js - About 1 hr to fix

                            Function visitAndLoad has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    visitAndLoad: function (fn, includeSelf, _recursion) {
                                        var dfd,
                                            res,
                                            loaders,
                                            node = this;
                            Severity: Minor
                            Found in src/jquery.fancytree.js - About 1 hr to fix

                              Function toggleClass has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      toggleClass: function (value, flag) {
                                          var className,
                                              hasClass,
                                              rnotwhite = /\S+/g,
                                              classNames = value.match(rnotwhite) || [],
                              Severity: Minor
                              Found in src/jquery.fancytree.js - About 1 hr to fix

                                Function removeClass has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    removeClass: 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 editCreateNode has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      $.ui.fancytree._FancytreeNodeClass.prototype.editCreateNode = function (
                                          mode,
                                          init
                                      ) {
                                          var newNode,
                                  Severity: Minor
                                  Found in src/jquery.fancytree.edit.js - About 1 hr to fix

                                    Function speed has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    jQuery.speed = function( speed, easing, fn ) {
                                        var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
                                            complete: fn || !fn && easing ||
                                                isFunction( speed ) && speed,
                                            duration: speed,
                                    Severity: Minor
                                    Found in lib/jquery.js - About 1 hr to fix

                                      Function set has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              set: function( elem, value, extra ) {
                                                  var matches,
                                                      styles = getStyles( elem ),
                                      
                                                      // Only read styles.position if the test has a chance to fail
                                      Severity: Minor
                                      Found in lib/jquery.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language