Skip to content

Commit b69ed4c

Browse files
authored
Documentation for diagnostic codes used in repo (#48151)
* Add list of diagnostics * Update Readme.md
1 parent ff8ea01 commit b69ed4c

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

Diff for: docs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The table below outlines the different docs in this folder and what they are hel
1515
| [Troubleshooting build errors](BuildErrors.md) | Common errors that occur when building the repo and how to resolve them | Anyone running into an issue with the build |
1616
| [Building from source](BuildFromSource.md) | Setup instructions for the ASP.NET Core repo | First-time contributors |
1717
| [Working with EventSources and EventCounters](EventSourceAndCounters.md) | Guidance on adding event tracing to a library | Anyone needing to add event tracing for diagnostics purposes |
18+
| [List of Diagnostics](list-of-diagnostics.md) | List of diagnostic codes used in repo | Anyone needing to add new codes for diagnostics purposes |
1819
| [Tests on Helix](Helix.md) | An overview of the Helix test environment | Anyone debugging tests in Helix or looking to understand the output from Helix builds |
1920
| [Issue management](IssueManagementPolicies.md) | Overview of policies in place to manage issues| Community members and collaborators looking to understand how we handle closed issue, issues that need author feedback, etc | |
2021
| [Preparing a patch update](PreparingPatchUpdates.md) | Documentation on how to setup for a patch release of ASP.NET Core | Anyone looking to publish servicing updates |

Diff for: docs/list-of-diagnostics.md

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# List of Diagnostics Produced by ASP.NET Libraries APIs
2+
3+
## Analyzer Warnings
4+
5+
### ASP (`ASP0000-ASP0024`)
6+
7+
| Diagnostic ID | Description |
8+
| :---------------- | :---------- |
9+
| __`ASP0000`__ | Do not call 'IServiceCollection.BuildServiceProvider' in 'ConfigureServices' |
10+
| __`ASP0001`__ | Authorization middleware is incorrectly configured |
11+
| __`ASP0003`__ | Do not use model binding attributes with route handlers |
12+
| __`ASP0004`__ | Do not use action results with route handlers |
13+
| __`ASP0005`__ | Do not place attribute on method called by route handler lambda |
14+
| __`ASP0006`__ | Do not use non-literal sequence numbers |
15+
| __`ASP0007`__ | Route parameter and argument optionality is mismatched |
16+
| __`ASP0008`__ | Do not use ConfigureWebHost with WebApplicationBuilder.Host |
17+
| __`ASP0009`__ | Do not use Configure with WebApplicationBuilder.WebHost |
18+
| __`ASP0010`__ | Do not use UseStartup with WebApplicationBuilder.WebHost |
19+
| __`ASP0011`__ | Suggest using builder.Logging over Host.ConfigureLogging or WebHost.ConfigureLogging |
20+
| __`ASP0012`__ | Suggest using builder.Services over Host.ConfigureServices or WebHost.ConfigureServices |
21+
| __`ASP0013`__ | Suggest switching from using Configure methods to WebApplicationBuilder.Configuration |
22+
| __`ASP0014`__ | Suggest using top level route registrations |
23+
| __`ASP0015`__ | Suggest using IHeaderDictionary properties |
24+
| __`ASP0016`__ | Do not return a value from RequestDelegate |
25+
| __`ASP0017`__ | Invalid route pattern |
26+
| __`ASP0018`__ | Unused route parameter |
27+
| __`ASP0019`__ | Suggest using IHeaderDictionary.Append or the indexer |
28+
| __`ASP0020`__ | Complex types referenced by route parameters must be parsable |
29+
| __`ASP0021`__ | When implementing BindAsync(...) method, the return type must be ValueTask<T> |
30+
| __`ASP0022`__ | Route conflict detected between route handlers |
31+
| __`ASP0023`__ | Route conflict detected between controller actions |
32+
| __`ASP0024`__ | Route handler has multiple parameters with the [FromBody] attribute |
33+
34+
### API (`API1000-API1003`)
35+
36+
| Diagnostic ID | Description |
37+
| :---------------- | :---------- |
38+
| __`API1000`__ | Action returns undeclared status code |
39+
| __`API1001`__ | Action returns undeclared success result |
40+
| __`API1002`__ | Action documents status code that is not returned |
41+
| __`API1003`__ | Action methods on ApiController instances do not require explicit model validation check |
42+
43+
### MVC (`MVC1000` - `MVC1006`)
44+
B
45+
| Diagnostic ID | Description |
46+
| :---------------- | :---------- |
47+
| __`MVC1000`__ | Use of IHtmlHelper.{0} should be avoided |
48+
| __`MVC1001`__ | Filters cannot be applied to page handler methods |
49+
| __`MVC1002`__ | Route attributes cannot be applied to page handler methods |
50+
| __`MVC1003`__ | Route attributes cannot be applied to page models |
51+
| __`MVC1004`__ | Rename model bound parameter |
52+
| __`MVC1005`__ | Cannot use UseMvc with Endpoint Routing |
53+
| __`MVC1006`__ | Methods containing TagHelpers must be async and return Task |
54+
55+
### BL (`BL0001-BL0007`)
56+
57+
| Diagnostic ID | Description |
58+
| :---------------- | :---------- |
59+
| __`BL0001`__ | Component parameter should have public setters |
60+
| __`BL0002`__ | Component has multiple CaptureUnmatchedValues parameters |
61+
| __`BL0003`__ | Component parameter with CaptureUnmatchedValues has the wrong type |
62+
| __`BL0004`__ | Component parameter should be public |
63+
| __`BL0005`__ | Component parameter should not be set outside of its component |
64+
| __`BL0006`__ | Do not use RenderTree types |
65+
| __`BL0007`__ | Component parameters should be auto properties |
66+
67+
### Request Delegate Generator (`RDG001-RDG004`)
68+
69+
| Diagnostic ID | Description |
70+
| :---------------- | :---------- |
71+
| __`RDG001`__ | Unable to resolve route pattern |
72+
| __`RDG002`__ | Unable to resolve endpoint handler |
73+
| __`RDG003`__ | Unable to resolve parameter |
74+
| __`RDG004`__ | Unable to resolve anonymous type |
75+
76+
### SignalR Source Generator (`SSG0000-SSG0110`)
77+
78+
| Diagnostic ID | Description |
79+
| :---------------- | :---------- |
80+
| __`SSG0000`__ | Non-interface generic type argument |
81+
| __`SSG0001`__ | Unsupported return type |
82+
| __`SSG0002`__ | Too many HubServerProxy attributed methods |
83+
| __`SSG0003`__ | HubServerProxy attributed method has bad accessibility |
84+
| __`SSG0004`__ | HubServerProxy attributed method is not partial |
85+
| __`SSG0005`__ | HubServerProxy attributed method is not an extension method |
86+
| __`SSG0006`__ | HubServerProxy attributed method has bad number of type arguments |
87+
| __`SSG0007`__ | HubServerProxy attributed method type argument and return type does not match |
88+
| __`SSG0008`__ | HubServerProxy attributed method has bad number of arguments |
89+
| __`SSG0009`__ | HubServerProxy attributed method has argument of wrong type |
90+
| __`SSG0100`__ | Unsupported return type |
91+
| __`SSG0102`__ | Too many HubClientProxy attributed methods |
92+
| __`SSG0103`__ | HubClientProxy attributed method has bad accessibility |
93+
| __`SSG0104`__ | HubClientProxy attributed method is not partial |
94+
| __`SSG0105`__ | HubClientProxy attributed method is not an extension method |
95+
| __`SSG0106`__ | HubClientProxy attributed method has bad number of type arguments |
96+
| __`SSG0107`__ | HubClientProxy attributed method type argument and return type does not match |
97+
| __`SSG0108`__ | HubClientProxy attributed method has bad number of arguments |
98+
| __`SSG0109`__ | HubClientProxy attributed method has first argument of wrong type |
99+
| __`SSG0110`__ | HubClientProxy attributed method has wrong return type |

0 commit comments

Comments
 (0)