mar10/fancytree

View on GitHub

Showing 460 of 700 total issues

Function before has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      before: function before() {
        var _this = this;
  
        var module = this.module;
        var notStartedModules = getNotStartedModules(module); // ensure the callbacks are executed serially for each module
Severity: Minor
Found in lib/qunit.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

        if ( ( !support.boxSizingReliable() && isBorderBox ||
    
            // Support: IE 10 - 11+, Edge 15 - 18+
            // IE/Edge misreport `getComputedStyle` of table rows with width/height
            // set in CSS while `offset*` properties report correct values.
    Severity: Critical
    Found in lib/jquery.js - About 1 hr to fix

      Function nodeKeydown has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              nodeKeydown: function (ctx) {
                  var nextNode = null,
                      nextIdx = null,
                      tree = ctx.tree,
                      node = ctx.node,
      Severity: Minor
      Found in src/jquery.fancytree.grid.js - About 1 hr to fix

        Function left has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    left: function( position, data ) {
                        var within = data.within,
                            withinOffset = within.offset.left + within.scrollLeft,
                            outerWidth = within.width,
                            offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
        Severity: Minor
        Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 1 hr to fix

          Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function showHide( elements, show ) {
              var display, elem,
                  values = [],
                  index = 0,
                  length = elements.length;
          Severity: Minor
          Found in lib/jquery.js - About 1 hr to fix

            Function left has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    left: function( position, data ) {
                        var within = data.within,
                            withinOffset = within.offset.left + within.scrollLeft,
                            outerWidth = within.width,
                            offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
            Severity: Minor
            Found in src/jquery-ui-dependencies/jquery-ui.js - About 1 hr to fix

              Function left has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      left: function( position, data ) {
                          var within = data.within,
                              withinOffset = within.offset.left + within.scrollLeft,
                              outerWidth = within.width,
                              offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
              Severity: Minor
              Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 1 hr to fix

                Function cookie has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    var config = $.cookie = function (key, value, options) {
                
                        // write
                        if (value !== undefined) {
                            options = $.extend({}, config.defaults, options);
                Severity: Minor
                Found in lib/jquery.cookie.js - About 1 hr to fix

                  Function diffLinesToChars has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        DiffMatchPatch.prototype.diffLinesToChars = function (text1, text2) {
                          var lineArray, lineHash, chars1, chars2;
                          lineArray = []; // E.g. lineArray[4] === 'Hello\n'
                    
                          lineHash = {}; // E.g. lineHash['Hello\n'] === 4
                  Severity: Minor
                  Found in lib/qunit.js - About 1 hr to fix

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

                        function evalEffectModifiers(tree, event, effectDefault) {
                            var res = effectDefault;
                    
                            if (isMac) {
                                if (event.metaKey && event.altKey) {
                    Severity: Minor
                    Found in src/jquery.fancytree.dnd5.js - About 1 hr to fix

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

                              _createWidget: function( options, element ) {
                                  element = $( element || this.defaultElement || this )[ 0 ];
                                  this.element = $( element );
                                  this.uuid = widgetUuid++;
                                  this.eventNamespace = "." + this.widgetName + this.uuid;
                      Severity: Minor
                      Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 1 hr to fix

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

                                    getEventTarget: function (event) {
                                        var $target,
                                            tree,
                                            tcn = event && event.target ? event.target.className : "",
                                            res = { node: this.getNode(event.target), type: undefined };
                        Severity: Minor
                        Found in src/jquery.fancytree.js - About 1 hr to fix

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

                                      nodeRemoveChild: function (ctx, childNode) {
                                          var idx,
                                              node = ctx.node,
                                              // opts = ctx.options,
                                              subCtx = $.extend({}, ctx, { node: childNode }),
                          Severity: Minor
                          Found in src/jquery.fancytree.js - About 1 hr to fix

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

                                    function () {
                                        var // wrapper = this.scrollWrapper,
                                            // $wrapper = $(wrapper),
                                            tree = this;
                            
                            
                            Severity: Minor
                            Found in src/jquery.fancytree.grid.js - About 1 hr to fix

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

                                      handler: function( event ) {
                                          var notAsync, result,
                                              saved = dataPriv.get( this, type );
                              
                                          if ( ( event.isTrigger & 1 ) && this[ type ] ) {
                              Severity: Minor
                              Found in lib/jquery.js - About 1 hr to fix

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

                                    _createWidget: function( options, element ) {
                                        element = $( element || this.defaultElement || this )[ 0 ];
                                        this.element = $( element );
                                        this.uuid = widgetUuid++;
                                        this.eventNamespace = "." + this.widgetName + this.uuid;
                                Severity: Minor
                                Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 1 hr to fix

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

                                      _createWidget: function( options, element ) {
                                          element = $( element || this.defaultElement || this )[ 0 ];
                                          this.element = $( element );
                                          this.uuid = widgetUuid++;
                                          this.eventNamespace = "." + this.widgetName + this.uuid;
                                  Severity: Minor
                                  Found in src/jquery-ui-dependencies/jquery-ui.js - About 1 hr to fix

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

                                          DiffMatchPatch.prototype.DiffMain = function (text1, text2, optChecklines) {
                                            var deadline, checklines, commonlength, commonprefix, commonsuffix, diffs; // The diff must be complete in up to 1 second.
                                      
                                            deadline = new Date().getTime() + 1000; // Check for null inputs.
                                      
                                    Severity: Minor
                                    Found in lib/qunit.js - About 1 hr to fix

                                      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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language