mar10/fancytree

View on GitHub

Showing 700 of 700 total issues

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

var uniqueId = $.fn.extend( {
    uniqueId: ( function() {
        var uuid = 0;

        return function() {
Severity: Major
Found in src/jquery-ui-dependencies/jquery-ui.js and 1 other location - About 6 hrs to fix
src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js on lines 1424..1444

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

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

                        try {
                            tree.phase = "userEvent";
                            switch (event.type) {
                                case "click":
                                    ctx.targetType = et.type;
Severity: Major
Found in src/jquery.fancytree.js and 1 other location - About 6 hrs to fix
src/jquery.fancytree.fixed.js on lines 156..186

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

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

                try {
                    tree.phase = "userEvent";
                    switch (evt.type) {
                        case "click":
                            ctx.targetType = et.type;
Severity: Major
Found in src/jquery.fancytree.fixed.js and 1 other location - About 6 hrs to fix
src/jquery.fancytree.js on lines 6669..6702

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

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

        nodeKeydown: function (ctx) {
            var handleKeys,
                inputType,
                res,
                $td,
Severity: Major
Found in src/jquery.fancytree.ariagrid.js - About 5 hrs to fix

    Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn.position = function( options ) {
            if ( !options || !options.of ) {
                return _position.apply( this, arguments );
            }
    
    
    Severity: Major
    Found in src/jquery-ui-dependencies/jquery-ui-iife.js - About 5 hrs to fix

      Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      $.fn.position = function( options ) {
          if ( !options || !options.of ) {
              return _position.apply( this, arguments );
          }
      
      
      Severity: Major
      Found in src/jquery-ui-dependencies/jquery.fancytree.ui-deps.js - About 5 hrs to fix

        Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        $.fn.position = function( options ) {
            if ( !options || !options.of ) {
                return _position.apply( this, arguments );
            }
        
        
        Severity: Major
        Found in src/jquery-ui-dependencies/jquery-ui.js - About 5 hrs to fix

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

              function updateControls() {
                  var query = $.trim($("input[name=query]").val());
          
                  $("#btnPin").attr("disabled", !taxonTree.getActiveNode());
                  $("#btnUnpin")
          Severity: Major
          Found in demo/taxonomy-browser/taxonomy-browser.js and 1 other location - About 5 hrs to fix
          demo/taxonomy-browser/taxonomy-browser-itis.js on lines 46..55

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

          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

              function updateControls() {
                  var query = $.trim($("input[name=query]").val());
          
                  $("#btnPin").attr("disabled", !taxonTree.getActiveNode());
                  $("#btnUnpin")
          Severity: Major
          Found in demo/taxonomy-browser/taxonomy-browser-itis.js and 1 other location - About 5 hrs to fix
          demo/taxonomy-browser/taxonomy-browser.js on lines 59..68

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

          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

          File jquery.fancytree.table.js has 407 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*!
           * jquery.fancytree.table.js
           *
           * Render tree as table (aka 'tree grid', 'table tree').
           * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
          Severity: Minor
          Found in src/jquery.fancytree.table.js - About 5 hrs to fix

            Function _bind has 144 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        _bind: function () {
                            var self = this,
                                opts = this.options,
                                tree = this.tree,
                                ns = tree._ns;
            Severity: Major
            Found in src/jquery.fancytree.js - About 5 hrs to fix

              File jquery.fancytree.filter.js has 404 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*!
               * jquery.fancytree.filter.js
               *
               * Remove or highlight tree nodes, based on a filter.
               * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
              Severity: Minor
              Found in src/jquery.fancytree.filter.js - About 5 hrs to fix

                Function _registerDnd has 141 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function _registerDnd() {
                        if (didRegisterDnd) {
                            return;
                        }
                
                
                Severity: Major
                Found in src/jquery.fancytree.dnd.js - About 5 hrs to fix

                  File taxonomy-browser.js has 401 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*!
                   * Fancytree Taxonomy Browser
                   *
                   * Copyright (c) 2015, Martin Wendt (https://wwWendt.de)
                   *
                  Severity: Minor
                  Found in demo/taxonomy-browser/taxonomy-browser.js - About 5 hrs to fix

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

                        _create: function() {
                            if ( !this.options.trigger ) {
                                this.options.trigger = this.element.prev();
                            }
                    
                    
                    Severity: Major
                    Found in lib/jquery.popup.js - About 5 hrs to fix

                      File jquery.fancytree.persist.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*!
                       * jquery.fancytree.persist.js
                       *
                       * Persist tree status in cookiesRemove or highlight tree nodes, based on a filter.
                       * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
                      Severity: Minor
                      Found in src/jquery.fancytree.persist.js - About 5 hrs to fix

                        Function toolbarModuleFilter has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              function toolbarModuleFilter(beginDetails) {
                                var initialSelected = null;
                                dropdownData = {
                                  options: beginDetails.modules.slice(),
                                  selectedMap: new StringMap(),
                        Severity: Major
                        Found in lib/qunit.js - About 5 hrs to fix

                          File jquery.themeswitcher.js has 392 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /**
                           * jQuery Theme Switcher plugin
                           *
                           * Copyright (c) 2011 Dave Hoff (davehoff.com)
                           * Dual licensed under the MIT and GPL licenses:
                          Severity: Minor
                          Found in lib/Super-Theme-Switcher/jquery.themeswitcher.js - About 5 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                        if ( event.pageX === 0 && event.pageY === 0 && Object.defineProperty ) {
                                            eventDoc = event.relatedTarget.ownerDocument || document;
                                            doc = eventDoc.documentElement;
                                            body = eventDoc.body;
                            
                            
                            Severity: Critical
                            Found in lib/jquery.simulate.js - About 5 hrs to fix

                              Function goAsync has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          goAsync: function goAsync(search, targets, options) {
                                            var canceled = false;
                                            var p = new Promise(function (resolve, reject) {
                                              if (search == 'farzher') return resolve([{
                                                target: "farzher was here (^-^*)/",
                              Severity: Major
                              Found in lib/qunit.js - About 5 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language