Undev/redmine-stuff-to-do-plugin

View on GitHub

Showing 175 of 609 total issues

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

    isOver: function(y, x, top, left, height, width) {
Severity: Minor
Found in assets/javascripts/ui/ui.core.js - About 45 mins to fix

    Method get_user has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

      def get_user
        render_403 unless User.current.logged?
    
        if params[:user_id] && params[:user_id] != User.current.id.to_s
          if User.current.admin?
    Severity: Minor
    Found in app/controllers/stuff_to_do_controller.rb - About 45 mins 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

    Avoid deeply nested control flow statements.
    Open

                            if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
                                continue;
    Severity: Major
    Found in assets/javascripts/jquery-ui.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              for (var j = this.items.length - 1; j >= 0; j--) {
                                  if(!contains(this.containers[i].element[0], this.items[j].item[0])) continue;
                                  var cur = this.items[j][this.containers[i].floating ? 'left' : 'top'];
                                  if(Math.abs(cur - base) < dist) {
                                      dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
      Severity: Major
      Found in assets/javascripts/jquery-ui.js - About 45 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
                    return this._hide.apply(this, arguments);
                else {
                    var o = arguments[1] || {}; o['mode'] = 'hide';
                    return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
        Severity: Major
        Found in assets/javascripts/jquery-ui.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
                      return this._show.apply(this, arguments);
                  else {
                      var o = arguments[1] || {}; o['mode'] = 'show';
                      return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
          Severity: Major
          Found in assets/javascripts/jquery-ui.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                    if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
                            !$target.hasClass($.datepicker.markerClassName) &&
                            !$target.hasClass($.datepicker._triggerClass) &&
                            $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
                        $.datepicker._hideDatepicker(null, '');
            Severity: Major
            Found in assets/javascripts/ui/ui.datepicker.js - About 40 mins to fix

              Function easeInOutCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  easeInOutCubic: function (x, t, b, c, d) {
              Severity: Minor
              Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                Function easeInQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    easeInQuart: function (x, t, b, c, d) {
                Severity: Minor
                Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                  Function easeInElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      easeInElastic: function (x, t, b, c, d) {
                  Severity: Minor
                  Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                    Function easeOutElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        easeOutElastic: function (x, t, b, c, d) {
                    Severity: Minor
                    Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                      Function easeInOutElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          easeInOutElastic: function (x, t, b, c, d) {
                      Severity: Minor
                      Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                        Function easeInOutQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            easeInOutQuart: function (x, t, b, c, d) {
                        Severity: Minor
                        Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                          Function easeOutExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              easeOutExpo: function (x, t, b, c, d) {
                          Severity: Minor
                          Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                            Function easeInCirc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                easeInCirc: function (x, t, b, c, d) {
                            Severity: Minor
                            Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                              Function morph has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  morph: function(remove,add,speed,easing,callback) {
                              Severity: Minor
                              Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                                Function swing has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    swing: function (x, t, b, c, d) {
                                Severity: Minor
                                Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                                  Function easeInOutQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      easeInOutQuad: function (x, t, b, c, d) {
                                  Severity: Minor
                                  Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                                    Function easeInCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        easeInCubic: function (x, t, b, c, d) {
                                    Severity: Minor
                                    Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                                      Function easeOutCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          easeOutCubic: function (x, t, b, c, d) {
                                      Severity: Minor
                                      Found in assets/javascripts/jquery-ui.js - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language