[Analyzer] Ensure Minimal API Endpoint Returns On All Paths
Open
analyzer
area-minimal
feature-minimal-actions
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
Given that a Minimal API endpoint uses the `Delegate` or `RequestDelegate` type, it is technically valid that not all paths have return values. While this is valid `C#` code, it likely is not the intent of the developer. Here's an example of a compilable endpoint that results in an unintended result.

The bug is subtle and could likely cause frustration.
## Solution
Create an analyzer that determines if all paths in an endpoint result in a return value or exception being thrown.
Contributor guide
Assessment
This issue has not been assessed yet.