mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

Function top has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        top: function( position, data ) {
            var within = data.within,
                withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
                outerHeight = data.within.height,
                collisionPosTop = position.top - data.collisionPosition.marginTop,
Severity: Minor
Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 1 hr to fix

    Function top has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            top: function( position, data ) {
                var within = data.within,
                    withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
                    outerHeight = data.within.height,
                    collisionPosTop = position.top - data.collisionPosition.marginTop,
    Severity: Minor
    Found in src/jquery-ui-dependencies/jquery-ui.js - About 1 hr to fix

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

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

        Function parseHTML has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jQuery.parseHTML = function( data, context, keepScripts ) {
            if ( typeof data !== "string" ) {
                return [];
            }
            if ( typeof context === "boolean" ) {
        Severity: Minor
        Found in lib/jquery.js - About 1 hr to fix

          Function buildNav has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function buildNav(members) {
              var globalNav;
              var nav = '<h2><a href="index.html">Home</a></h2>';
              var seen = {};
              var seenTutorials = {};
          Severity: Minor
          Found in bin/jsdoc3-moogle/publish.js - About 1 hr to fix

            Function nodeSetStatus has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    nodeSetStatus: function (ctx, status, message, details) {
                        var res,
                            span,
                            opts = ctx.options.glyph,
                            node = ctx.node;
            Severity: Minor
            Found in src/jquery.fancytree.glyph.js - About 1 hr to fix

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

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

                Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    finish: function( type ) {
                        if ( type !== false ) {
                            type = type || "fx";
                        }
                        return this.each( function() {
                Severity: Minor
                Found in lib/jquery.js - About 1 hr to fix

                  Function off has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      off: function( types, selector, fn ) {
                          var handleObj, type;
                          if ( types && types.preventDefault && types.handleObj ) {
                  
                              // ( event )  dispatched jQuery.Event
                  Severity: Minor
                  Found in lib/jquery.js - About 1 hr to fix

                    Function keydown has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                keydown: function( event ) {
                                    switch ( event.keyCode ) {
                                        case $.ui.keyCode.TAB:
                                            // Waiting for close() will make popup hide too late, which breaks tab key behavior
                                            this.element.hide();
                    Severity: Minor
                    Found in lib/jquery.popup.js - About 1 hr to fix

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

                              if ( isFunction( value ) ) {
                                  return this.each( function( j ) {
                                      jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
                                  } );
                              }
                      Severity: Major
                      Found in lib/jquery.js and 1 other location - About 1 hr to fix
                      lib/jquery.js on lines 8316..8320

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

                      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

                              if (
                                  opts.timings === true ||
                                  (opts.timings && $.inArray(name, opts.timings) >= 0)
                              ) {
                                  // if( name === "nodeRender" ) { logName += obj; }  // allow timing for recursive calls
                      Severity: Major
                      Found in src/jquery.fancytree.logger.js and 1 other location - About 1 hr to fix
                      src/jquery.fancytree.logger.js on lines 91..104

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

                      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

                          test.only.each = function (testName, dataset, callback) {
                            runEach(dataset, function (data, testKey) {
                              addOnlyTest({
                                testName: makeEachTestName(testName, testKey),
                                callback: callback,
                      Severity: Major
                      Found in lib/qunit.js and 1 other location - About 1 hr to fix
                      lib/qunit.js on lines 3702..3712

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

                      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

                            }, {
                              key: "false",
                              value: function _false(result, message) {
                                this.pushResult({
                                  result: result === false,
                      Severity: Major
                      Found in lib/qunit.js and 1 other location - About 1 hr to fix
                      lib/qunit.js on lines 1692..1702

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

                      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

                            each: function each(testName, dataset, callback) {
                              runEach(dataset, function (data, testKey) {
                                addTest({
                                  testName: makeEachTestName(testName, testKey),
                                  callback: callback,
                      Severity: Major
                      Found in lib/qunit.js and 1 other location - About 1 hr to fix
                      lib/qunit.js on lines 3738..3748

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

                      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

                              if ( isFunction( value ) ) {
                                  return this.each( function( j ) {
                                      jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
                                  } );
                              }
                      Severity: Major
                      Found in lib/jquery.js and 1 other location - About 1 hr to fix
                      lib/jquery.js on lines 8279..8283

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

                      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

                              if (
                                  (self._super && opts.timings === true) ||
                                  (opts.timings && $.inArray(name, opts.timings) >= 0)
                              ) {
                                  // if( name === "nodeRender" ) { logName += obj; }  // allow timing for recursive calls
                      Severity: Major
                      Found in src/jquery.fancytree.logger.js and 1 other location - About 1 hr to fix
                      src/jquery.fancytree.logger.js on lines 121..139

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

                      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

                            }, {
                              key: "true",
                              value: function _true(result, message) {
                                this.pushResult({
                                  result: result === true,
                      Severity: Major
                      Found in lib/qunit.js and 1 other location - About 1 hr to fix
                      lib/qunit.js on lines 1702..1712

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

                      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 publish has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                      exports.publish = function(taffyData, opts, tutorials) {
                          var classes;
                          var conf;
                          var externals;
                          var files;
                      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 normalizeDragEnterResponse has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function normalizeDragEnterResponse(r) {
                              var res;
                      
                              if (!r) {
                                  return false;
                      Severity: Minor
                      Found in src/jquery.fancytree.dnd5.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language