mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

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

                            res = {
                                over: $.inArray("over", r) >= 0,
                                before: $.inArray("before", r) >= 0,
                                after: $.inArray("after", r) >= 0,
                            };
                Severity: Major
                Found in src/jquery.fancytree.dnd5.js and 1 other location - About 1 hr to fix
                src/jquery.fancytree.dnd.js on lines 626..630

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

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

                                        res = {
                                            over: $.inArray("over", r) >= 0,
                                            before: $.inArray("before", r) >= 0,
                                            after: $.inArray("after", r) >= 0,
                                        };
                Severity: Major
                Found in src/jquery.fancytree.dnd.js and 1 other location - About 1 hr to fix
                src/jquery.fancytree.dnd5.js on lines 119..123

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

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

                            var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
                Severity: Major
                Found in lib/jquery.configurator.js and 1 other location - About 1 hr to fix
                lib/jquery.configurator.js on lines 94..94

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

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

                            var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
                Severity: Major
                Found in lib/jquery.configurator.js and 1 other location - About 1 hr to fix
                lib/jquery.configurator.js on lines 151..151

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

                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 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
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language