mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

        warn: function(msg) {
            Array.prototype.unshift.call(arguments, LOGLEVEL_Warn); // prepend level
            methods._log.apply(this, arguments);
        },
Severity: Major
Found in lib/jquery.jsconsole.js and 3 other locations - About 50 mins to fix
lib/jquery.jsconsole.js on lines 107..110
lib/jquery.jsconsole.js on lines 111..114
lib/jquery.jsconsole.js on lines 119..122

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

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

        info: function(msg) {
            Array.prototype.unshift.call(arguments, LOGLEVEL_Info); // prepend level
            methods._log.apply(this, arguments);
        },
Severity: Major
Found in lib/jquery.jsconsole.js and 3 other locations - About 50 mins to fix
lib/jquery.jsconsole.js on lines 107..110
lib/jquery.jsconsole.js on lines 115..118
lib/jquery.jsconsole.js on lines 119..122

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

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

        error: function(msg) {
            Array.prototype.unshift.call(arguments, LOGLEVEL_Error); // prepend level
            methods._log.apply(this, arguments);
        }
Severity: Major
Found in lib/jquery.jsconsole.js and 3 other locations - About 50 mins to fix
lib/jquery.jsconsole.js on lines 107..110
lib/jquery.jsconsole.js on lines 111..114
lib/jquery.jsconsole.js on lines 115..118

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

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

              var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true;
Severity: Major
Found in lib/qunit.js and 2 other locations - About 50 mins to fix
lib/qunit.js on lines 4741..4741
lib/qunit.js on lines 4877..4877

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

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 ( !triggered ) {
            focusinEvent = $.Event( "focusin" );
            focusinEvent.preventDefault();
            element.trigger( focusinEvent );
            element.triggerHandler( "focus" );
Severity: Minor
Found in lib/jquery.simulate.js and 1 other location - About 50 mins to fix
lib/jquery.simulate.js on lines 255..260

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

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

        debug: function(msg) {
            Array.prototype.unshift.call(arguments, LOGLEVEL_Debug); // prepend level
            methods._log.apply(this, arguments);
        },
Severity: Major
Found in lib/jquery.jsconsole.js and 3 other locations - About 50 mins to fix
lib/jquery.jsconsole.js on lines 111..114
lib/jquery.jsconsole.js on lines 115..118
lib/jquery.jsconsole.js on lines 119..122

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

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 ( !triggered ) {
                focusoutEvent = $.Event( "focusout" );
                focusoutEvent.preventDefault();
                element.trigger( focusoutEvent );
                element.triggerHandler( "blur" );
Severity: Minor
Found in lib/jquery.simulate.js and 1 other location - About 50 mins to fix
lib/jquery.simulate.js on lines 225..230

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

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

                var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true;
Severity: Major
Found in lib/qunit.js and 2 other locations - About 50 mins to fix
lib/qunit.js on lines 4741..4741
lib/qunit.js on lines 4757..4757

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

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

Avoid deeply nested control flow statements.
Open

                        if (target === copy) {
                            continue;
                        }
Severity: Major
Found in src/jquery.fancytree.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if (copy && $.isPlainObject(copy)) {
                                clone = src && $.isPlainObject(src) ? src : {};
                                // Never move original objects, clone them
                                target[name] = _simpleDeepMerge(clone, copy);
                                // Don't bring in undefined values
    Severity: Major
    Found in src/jquery.fancytree.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if (res !== false) {
                                      dict.children.push(res);
                                  }
      Severity: Major
      Found in src/jquery.fancytree.js - About 45 mins to fix

        Function _onDragEvent has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    eventName,
                    node,
                    otherNode,
                    event,
                    ui,
        Severity: Minor
        Found in src/jquery.fancytree.dnd.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                              if (
                                                  node.selected === undefined ||
                                                  (instOpts.overrideSource &&
                                                      node.selected === false)
                                              ) {
          Severity: Major
          Found in src/jquery.fancytree.persist.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if (
                                            len === 2 &&
                                            ctx.options.clones.highlightClones
                                        ) {
                                            //                            node.debug("clones.treeRegisterNode: last =>", node.getCloneList());
            Severity: Major
            Found in src/jquery.fancytree.clones.js - About 45 mins to fix

              Function on has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function on( elem, types, selector, data, fn, one ) {
              Severity: Minor
              Found in lib/jquery.js - About 45 mins to fix

                Function init has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    init: function( elem, options, prop, end, easing, unit ) {
                Severity: Minor
                Found in lib/jquery.js - About 45 mins to fix

                  Function boxModelAdjustment has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
                  Severity: Minor
                  Found in lib/jquery.js - About 45 mins to fix

                    Function setMatcher has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                    Severity: Minor
                    Found in lib/jquery.js - About 45 mins to fix

                      Function renderLevelCss has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              containerId,
                              depth,
                              levelOfs,
                              lineOfs,
                              labelOfs,
                      Severity: Minor
                      Found in src/jquery.fancytree.wide.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                        } else if ( copy !== undefined ) {
                                            target[ name ] = copy;
                                        }
                        Severity: Major
                        Found in lib/jquery.js - About 45 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language