Showing 60 of 60 total issues

Function deparam has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

  deparam: function(params){

    if(! params) {
      return {};
    } 
Severity: Minor
Found in app/assets/javascripts/plugins/jquerymx.deparam.js - About 2 hrs 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 getParams has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        getParams: function( convert ) {
            var data = {},
                current;

            convert = convert === undefined ? false : convert;
Severity: Minor
Found in app/assets/javascripts/plugins/jquerymx-3.2.custom.js - About 1 hr to fix

    Function fileUploadXhr has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function fileUploadXhr(a) {
            var formdata = new FormData();
    
            for (var i=0; i < a.length; i++) {
                formdata.append(a[i].name, a[i].value);
    Severity: Minor
    Found in app/assets/javascripts/plugins/jquery.form.js - About 1 hr to fix

      Function initialize has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Filter.prototype.initialize = function() {
          var _this = this;
      
          this.form = _this.$target.find("form");
      
      
      Severity: Minor
      Found in app/assets/javascripts/cells/filter.js - About 1 hr to fix

        Function parseJSON has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    function parseJSON(obj, path)
                    {
                        // prepare
                            path = path || '';
                        
        Severity: Minor
        Found in app/assets/javascripts/plugins/jquery.populate.js - About 1 hr to fix

          Function _showPopover has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                Tour.prototype._showPopover = function(step, i) {
                  var content, nav, options, tip,
                    _this = this;
                  content = "" + step.content + "<br /><p>";
                  options = $.extend({}, this._options);
          Severity: Minor
          Found in app/assets/javascripts/plugins/bootstrap-tour.js - About 1 hr to fix

            Function fieldValue has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            $.fieldValue = function(el, successful) {
                var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
                if (successful === undefined) {
                    successful = true;
                }
            Severity: Minor
            Found in app/assets/javascripts/plugins/jquery.form.js - About 1 hr to fix

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

                Pod.prototype.expand = function() {
                  this.$title.removeClass("collapsed").addClass("expanded");
                  this.$content.show(Pod.expandDuration);
                };
              Severity: Major
              Found in app/assets/javascripts/cells/pod.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/cells/pod.js on lines 24..27

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

              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

                Pod.prototype.collapse = function() {
                  this.$title.removeClass("expanded").addClass("collapsed");
                  this.$content.hide(Pod.collapseDuration);
                };
              Severity: Major
              Found in app/assets/javascripts/cells/pod.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/cells/pod.js on lines 33..36

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

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

                deparam: function(params){
              
                  if(! params) {
                    return {};
                  } 
              Severity: Minor
              Found in app/assets/javascripts/plugins/jquerymx.deparam.js - About 1 hr to fix

                Function _reposition has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      Tour.prototype._reposition = function(tip, step) {
                        var offsetBottom, offsetRight, original_left, original_offsetHeight, original_offsetWidth, original_top, tipOffset;
                        original_offsetWidth = tip[0].offsetWidth;
                        original_offsetHeight = tip[0].offsetHeight;
                        tipOffset = tip.offset();
                Severity: Minor
                Found in app/assets/javascripts/plugins/bootstrap-tour.js - About 1 hr to fix

                  Function refresh has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    Backlog.prototype.refresh = function(updateHistory, data) {
                      var _this = this;
                  
                      var sorting = Sorting.instances[0];
                      var filter = Filter.instances[0];
                  Severity: Minor
                  Found in app/assets/javascripts/cells/backlog.js - About 1 hr to fix

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

                          Tour.prototype.showPrevStep = function() {
                            var step;
                            step = this.getStep(this._current);
                            return this.showStep(step.prev);
                          };
                    Severity: Major
                    Found in app/assets/javascripts/plugins/bootstrap-tour.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/plugins/bootstrap-tour.js on lines 211..215

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

                    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 (st) {
                                    for ( var i in st ) {
                                        var na = st[i].split(":");
                                        jt_obj.css( na[0], na[1] );
                                    }
                    Severity: Major
                    Found in app/assets/javascripts/plugins/jtextarea.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/plugins/jtextarea.js on lines 183..188

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

                    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

                          Tour.prototype.showNextStep = function() {
                            var step;
                            step = this.getStep(this._current);
                            return this.showStep(step.next);
                          };
                    Severity: Major
                    Found in app/assets/javascripts/plugins/bootstrap-tour.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/plugins/bootstrap-tour.js on lines 217..221

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

                    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 (st) {
                                        for ( var i in st ) {
                                            var na = st[i].split(":");
                                            jt_obj.css( na[0], na[1] );
                                        }
                    Severity: Major
                    Found in app/assets/javascripts/plugins/jtextarea.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/plugins/jtextarea.js on lines 210..215

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

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

                            html: function (ctl) {
                                
                                var re_nl = null;
                                var st = ctl.val();
                                
                    Severity: Minor
                    Found in app/assets/javascripts/plugins/jtextarea.js - About 1 hr to fix

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

                        Labels.prototype.attachEvents = function() {
                          var _this = this;
                      
                          var options = {
                            success: function(responseText, status, xhr) {
                      Severity: Minor
                      Found in app/assets/javascripts/cells/labels.js - About 1 hr to fix

                        Function initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            initialize: function() {
                              $(".backlog-sortable").sortable({
                                connectWith: ".backlog-connected",
                                placeholder: "backlog-placeholder-element",
                                update: function(event, ui) {
                        Severity: Minor
                        Found in app/assets/javascripts/sprint_ordering.js - About 1 hr to fix

                          Function toUpdateForm has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            GridDialog.prototype.toUpdateForm = function(event) {
                              if ($(event.target).is(".destroy")) return;
                          
                              var _this = this;
                          
                          
                          Severity: Minor
                          Found in app/assets/javascripts/widgets/patterns/grid_dialog.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language