rosa-abf/rosa-build

View on GitHub
app/controllers/home_controller.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 3 of 3 total issues

Method issues has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def issues
@created_issues = current_user.issues
@assigned_issues = Issue.where(assignee_id: current_user.id)
@all_issues = ProjectPolicy::Scope.new(current_user, Issue).membered.uniq.joins(:project)
 
Severity: Minor
Found in app/controllers/home_controller.rb - About 1 hr to fix

    Method issues has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def issues
    @created_issues = current_user.issues
    @assigned_issues = Issue.where(assignee_id: current_user.id)
    @all_issues = ProjectPolicy::Scope.new(current_user, Issue).membered.uniq.joins(:project)
     
    Severity: Minor
    Found in app/controllers/home_controller.rb - About 1 hr to fix

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

    def activity(is_my_activity = false)
    @filter = t('feed_menu').has_key?(params[:filter].try(:to_sym)) ? params[:filter].to_sym : :all
    @activity_feeds = current_user.activity_feeds
    .by_project_name(params[:project_name_filter])
    .by_owner_uname(params[:owner_filter])
    Severity: Minor
    Found in app/controllers/home_controller.rb - About 45 mins to fix

    There are no issues that match your filters.

    Category
    Status