mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

Function _classes has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _classes: function( options ) {
        var full = [];
        var that = this;

        options = $.extend( {
Severity: Minor
Found in src/jquery-ui-dependencies/jquery-ui.js - About 1 hr to fix

    Function keyHandler has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function keyHandler(handleObj) {
        if (typeof handleObj.data === "string") {
          handleObj.data = {
            keys: handleObj.data
          };
    Severity: Minor
    Found in 3rd-party/extensions/hotkeys/js/jquery.hotkeys.js - About 1 hr to fix

      Function _classes has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _classes: function( options ) {
              var full = [];
              var that = this;
      
              options = $.extend( {
      Severity: Minor
      Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 1 hr to fix

        Function initContextMenu has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var initContextMenu = function (tree, selector, menu, actions) {
                tree.$container.on("mousedown.contextMenu", function (event) {
                    var node = $.ui.fancytree.getNode(event);
        
                    if (node) {
        Severity: Minor
        Found in 3rd-party/extensions/contextmenu/js/jquery.fancytree.contextMenu.js - About 1 hr to fix

          Function reRegister has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              $.ui.fancytree._FancytreeNodeClass.prototype.reRegister = function (
                  key,
                  refKey
              ) {
                  key = key == null ? null : "" + key;
          Severity: Minor
          Found in src/jquery.fancytree.clones.js - About 1 hr to fix

            Function addCombinator has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function addCombinator( matcher, combinator, base ) {
                var dir = combinator.dir,
                    skip = combinator.next,
                    key = skip || dir,
                    checkNonElements = base && key === "parentNode",
            Severity: Minor
            Found in lib/jquery.js - About 1 hr to fix

              Function initIframe has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function initIframe() {
                      var iframeWin,
                          body = document.body;
              
                      function onIframeLoad() {
              Severity: Minor
              Found in lib/qunit-composite.js - About 1 hr to fix

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

                                  if (resultsLen < limit) {
                                    q.add(result);
                                    ++resultsLen;
                                  } else {
                                    ++limitedCount;
                Severity: Major
                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                lib/qunit.js on lines 4968..4974

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

                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

                                      if (resultsLen < limit) {
                                        q.add(result);
                                        ++resultsLen;
                                      } else {
                                        ++limitedCount;
                Severity: Major
                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                lib/qunit.js on lines 4823..4829

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

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

                tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
                    var matched, match, tokens, type,
                        soFar, groups, preFilters,
                        cached = tokenCache[ selector + " " ];
                
                
                Severity: Minor
                Found in lib/jquery.js - About 1 hr to fix

                  Function val has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      val: function( value ) {
                          var hooks, ret, valueIsFunction,
                              elem = this[ 0 ];
                  
                          if ( !arguments.length ) {
                  Severity: Minor
                  Found in lib/jquery.js - About 1 hr to fix

                    Function done has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function done() {
                          // We have reached the end of the processing queue and are about to emit the
                          // "runEnd" event after which reporters typically stop listening and exit
                          // the process. First, check if we need to emit one final test.
                          if (config.stats.testCount === 0 && config.failOnZeroTests === true) {
                    Severity: Minor
                    Found in lib/qunit.js - About 1 hr to fix

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

                              info: function (msg) {
                                  if (this.tree.options.debugLevel >= 3) {
                                      Array.prototype.unshift.call(arguments, this.toString());
                                      consoleApply("info", arguments);
                                  }
                      Severity: Major
                      Found in src/jquery.fancytree.js and 2 other locations - About 1 hr to fix
                      src/jquery.fancytree.js on lines 940..945
                      src/jquery.fancytree.js on lines 2619..2624

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

                      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

                              warn: function (msg) {
                                  if (this.tree.options.debugLevel >= 2) {
                                      Array.prototype.unshift.call(arguments, this.toString());
                                      consoleApply("warn", arguments);
                                  }
                      Severity: Major
                      Found in src/jquery.fancytree.js and 2 other locations - About 1 hr to fix
                      src/jquery.fancytree.js on lines 940..945
                      src/jquery.fancytree.js on lines 1456..1461

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

                      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

                              error: function (msg) {
                                  if (this.tree.options.debugLevel >= 1) {
                                      Array.prototype.unshift.call(arguments, this.toString());
                                      consoleApply("error", arguments);
                                  }
                      Severity: Major
                      Found in src/jquery.fancytree.js and 2 other locations - About 1 hr to fix
                      src/jquery.fancytree.js on lines 1456..1461
                      src/jquery.fancytree.js on lines 2619..2624

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

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

                          function initCodeSamples() {
                              var info,
                                  $source = $("#sourceCode");
                      
                              $("#codeExample").clickToggle(
                      Severity: Minor
                      Found in demo/sample.js - About 1 hr to fix

                        Function leverageNative has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function leverageNative( el, type, expectSync ) {
                        
                            // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
                            if ( !expectSync ) {
                                if ( dataPriv.get( el, type ) === undefined ) {
                        Severity: Minor
                        Found in lib/jquery.js - About 1 hr to fix

                          Function data has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              data: function( key, value ) {
                                  var i, name, data,
                                      elem = this[ 0 ],
                                      attrs = elem && elem.attributes;
                          
                          
                          Severity: Minor
                          Found in lib/jquery.js - About 1 hr to fix

                            Function diffLineMode has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  DiffMatchPatch.prototype.diffLineMode = function (text1, text2, deadline) {
                                    var a, diffs, linearray, pointer, countInsert, countDelete, textInsert, textDelete, j; // Scan the text on a line-by-line basis first.
                              
                                    a = this.diffLinesToChars(text1, text2);
                                    text1 = a.chars1;
                            Severity: Minor
                            Found in lib/qunit.js - About 1 hr to fix

                              Function renderCode has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      renderCode: function(){
                                          var plugin = $(this.element).data("ui-" + this.options.pluginName) || $(this.element).data(this.options.pluginName),
                                              opts = this.options,
                                              actualOpts = plugin.options,
                                              availOptList = opts.optionList,
                              Severity: Minor
                              Found in lib/jquery.configurator.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language