Skip to content

Commit

Permalink
Ignore Style/RedundantReturn rubocop offense
Browse files Browse the repository at this point in the history
In this case we want the return to avoid double render errors.
  • Loading branch information
krauselukas committed Oct 15, 2024
1 parent a483843 commit f8f5d12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/app/controllers/source_project_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def show
raise Project::UnknownObjectError, "Project not found: #{project_name}" unless @project
raise InvalidParameterError, "'#{params[:view]}' is not a valid 'view' parameter value." unless params[:view].in?(%w[verboseproductlist productlist issues info])

# we let the backend list the packages after we verified the project is visible
# rubocop:disable Style/RedundantReturn
case params[:view]
when 'verboseproductlist'
@products = Product.all_products(@project, params[:expand])
Expand All @@ -34,6 +34,7 @@ def show
when 'info'
pass_to_backend
end
# rubocop:enable Style/RedundantReturn
end

def render_project_issues
Expand Down

0 comments on commit f8f5d12

Please sign in to comment.