mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

Function add has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    add: function( elem, types, handler, data, selector ) {

        var handleObjIn, eventHandle, tmp,
            events, t, handleObj,
            special, handlers, type, namespaces, origType,
Severity: Major
Found in lib/jquery.js - About 2 hrs to fix

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

            function done( status, nativeStatusText, responses, headers ) {
                var isSuccess, success, error, response, modified,
                    statusText = nativeStatusText;
    
                // Ignore repeat invocations
    Severity: Major
    Found in lib/jquery.js - About 2 hrs to fix

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

                  $tableWrapper
                      .on(
                          "mouseenter",
                          "." +
                              fcn.bottomRight +
      Severity: Major
      Found in src/jquery.fancytree.fixed.js and 1 other location - About 2 hrs to fix
      src/jquery.fancytree.fixed.js on lines 189..217

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

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

            DiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) {
              var changes, equalities, equalitiesLength, lastequality, pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1, lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;
              changes = false;
              equalities = []; // Stack of indices where equalities are found.
        
      Severity: Major
      Found in lib/qunit.js - About 2 hrs to fix

        Function nodeRender has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                nodeRender: function (ctx, force, deep, collapsed, _recursive) {
                    var children,
                        i,
                        l,
                        outsideViewport,
        Severity: Major
        Found in src/jquery.fancytree.grid.js - About 2 hrs to fix

          Function setMatcher has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
              if ( postFilter && !postFilter[ expando ] ) {
                  postFilter = setMatcher( postFilter );
              }
              if ( postFinder && !postFinder[ expando ] ) {
          Severity: Major
          Found in lib/jquery.js - About 2 hrs to fix

            Function treeInit has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    treeInit: function (ctx) {
                        var $temp,
                            tree = ctx.tree,
                            opts = ctx.options,
                            glyph = opts.glyph || null,
            Severity: Major
            Found in src/jquery.fancytree.dnd5.js - About 2 hrs to fix

              Function _create has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          _create: function () {
                              this.tree = new Fancytree(this);
              
                              this.$source =
                                  this.source || this.element.data("type") === "json"
              Severity: Major
              Found in src/jquery.fancytree.js - About 2 hrs to fix

                Function resolve has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                    function resolve( depth, deferred, handler, special ) {
                                        return function() {
                                            var that = this,
                                                args = arguments,
                                                mightThrow = function() {
                Severity: Major
                Found in lib/jquery.js - About 2 hrs to fix

                  Function FancytreeNode has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function FancytreeNode(parent, obj) {
                          var i, l, name, cl;
                  
                          this.parent = parent;
                          this.tree = parent.tree;
                  Severity: Major
                  Found in src/jquery.fancytree.js - About 2 hrs to fix

                    Function algorithmNoTypo has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                algorithmNoTypo: function algorithmNoTypo(searchLowerCodes, prepared, searchLowerCode) {
                                  var targetLowerCodes = prepared._targetLowerCodes;
                                  var searchLen = searchLowerCodes.length;
                                  var targetLen = targetLowerCodes.length;
                                  var searchI = 0; // where we at
                    Severity: Major
                    Found in lib/qunit.js - About 2 hrs to fix

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

                          function _getResolvedPromise(context, argArray) {
                              if (context === undefined) {
                                  return $.Deferred(function () {
                                      this.resolve();
                                  }).promise();
                      Severity: Major
                      Found in src/jquery.fancytree.js and 1 other location - About 2 hrs to fix
                      src/jquery.fancytree.js on lines 430..439

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

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

                          function _getRejectedPromise(context, argArray) {
                              if (context === undefined) {
                                  return $.Deferred(function () {
                                      this.reject();
                                  }).promise();
                      Severity: Major
                      Found in src/jquery.fancytree.js and 1 other location - About 2 hrs to fix
                      src/jquery.fancytree.js on lines 419..428

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

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

                              findRelatedNode: function (node, where, includeHidden) {
                                  var res = null,
                                      KC = $.ui.keyCode;
                      
                                  switch (where) {
                      Severity: Major
                      Found in src/jquery.fancytree.js - About 2 hrs to fix

                        Function treeSetOption has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    treeSetOption: function (ctx, key, value) {
                                        var tree = ctx.tree,
                                            callDefault = true,
                                            callCreate = false,
                                            callRender = false;
                        Severity: Major
                        Found in src/jquery.fancytree.js - About 2 hrs to fix

                          Function nodeRenderStatus has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  nodeRenderStatus: function (ctx) {
                                      var checkbox,
                                          icon,
                                          res,
                                          span,
                          Severity: Major
                          Found in src/jquery.fancytree.glyph.js - About 2 hrs to fix

                            Function treeRegisterNode has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    treeRegisterNode: function (ctx, add, node) {
                                        var refList,
                                            len,
                                            tree = ctx.tree,
                                            keyMap = tree.keyMap,
                            Severity: Major
                            Found in src/jquery.fancytree.clones.js - About 2 hrs to fix

                              Function hashMurmur3 has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function hashMurmur3(key, asString, seed) {
                                      /*eslint-disable no-bitwise */
                                      var h1b,
                                          k1,
                                          remainder = key.length & 3,
                              Severity: Major
                              Found in src/jquery.fancytree.clones.js - About 2 hrs to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                        if ( forward && useCache ) {
                                
                                                            // Seek `elem` from a previously-cached index
                                
                                                            // ...in a gzip-friendly way
                                Severity: Critical
                                Found in lib/jquery.js - About 2 hrs to fix

                                  Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          superMatcher = function( seed, context, xml, results, outermost ) {
                                              var elem, j, matcher,
                                                  matchedCount = 0,
                                                  i = "0",
                                                  unmatched = seed && [],
                                  Severity: Major
                                  Found in lib/jquery.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language