Feature request: Run analyzers in debug mode
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
Problem motivation: #18768, `app.UseSpa` was in the wrong order.
Add ` app.UseRunAllAnalyzers` to template code to detect middleware order and other problems.
```
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseDatabaseErrorPage();
app.UseRunAllAnalyzers(); // run middleware order check and other checks
}
else
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
...
```
`UseRunAllAnalyzers` could be updated frequently to add more checks.
See https://twitter.com/davidfowl/status/1228902288627912705 where `@davidfowl` requests this.
cc @javiercn
Contributor guide
Assessment
This issue has not been assessed yet.