Undev/redmine-stuff-to-do-plugin

View on GitHub

Showing 175 of 609 total issues

Avoid too many return statements within this function.
Open

    return false;
Severity: Major
Found in assets/javascripts/ui/ui.accordion.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return true;
    Severity: Major
    Found in assets/javascripts/ui/ui.sortable.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      && y2 - (this.helperProportions.height / 2) < b )) return false; // Top Half
      Severity: Major
      Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return colors[jQuery.trim(color).toLowerCase()];
        Severity: Major
        Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                return Project.new
          Severity: Major
          Found in app/controllers/stuff_to_do_controller.rb - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return false;
            Severity: Major
            Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              if(x2 > l && x1 < l) return 2; //Crosses left edge
              Severity: Major
              Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                if(x1 < r && x2 > r) return 1; //Crosses right edge
                Severity: Major
                Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return colors['transparent']
                  Severity: Major
                  Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    else if (direction == 2 && (y1 + dyClick) > t + height/2) { return 1; } // down
                    Severity: Major
                    Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
                      Severity: Major
                      Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                              return nil
                        Severity: Major
                        Found in app/controllers/stuff_to_do_controller.rb - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          if(y1 < b && y2 > b) return 2; //Crosses bottom edge
                          Severity: Major
                          Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                            if(y2 > t && y1 < t) return 1; //Crosses top edge
                            Severity: Major
                            Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                              Method save_time_entry has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def save_time_entry
                                  @time_entry = TimeEntry.new
                                  @time_entry.user = User.current
                                  if params[:time_entry] &&  params[:time_entry].first
                                    @time_entry.attributes = params[:time_entry].first
                              Severity: Minor
                              Found in app/controllers/stuff_to_do_controller.rb - About 25 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

                              Severity
                              Category
                              Status
                              Source
                              Language