-
Official documentation for all IDE analyzer diagnostic IDs is added to
dotnet/docs
repo at https://github.com/dotnet/docs/tree/main/docs/fundamentals/code-analysis/style-rules. -
Each IDE diagnostic ID has a dedicated documentation page. For example:
- Diagnostic with code style option: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0011
- Diagnostic without code style option: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0004
- Multiple diagnostic IDs sharing the same option(s): https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0003-ide0009. In this case, a redirection for all diagnostic IDs must be added.
-
We have tabular indices for IDE diagnostic IDs and code style options for easier reference and navigation:
- Primary index (rule ID + code style options): https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/
- Secondary index (code style options only): https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#net-style-rules
- Indices for each preference/option group. For example:
- Modifier preferences: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/modifier-preferences
- Expression-level preferences: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/expression-level-preferences
Roslyn IDE team (@dotnet/roslyn-ide) is responsible for ensuring that the documentation for IDE analyzers is up-to-date. Whenever we add a new IDE analyzer, add new code style option(s) OR update semantics of existing IDE analyzers the following needs to be done:
-
Action required in dotnet/docs repo:
- If you creating a Roslyn PR for an IDE analyzer:
- Please follow the steps at Contribute docs for 'IDExxxx' rules to add documentation for IDE analyzers to dotnet/docs repo.
- Ideally, the documentation PR should be created in parallel to the Roslyn PR or immediately following the approval/merge of Roslyn PR.
- If you are reviewing a Roslyn PR for an IDE analyzer:
- Please ensure that the analyzer author is made aware of the above doc contribution requirements, especially if it is a community PR.
- If the documentation PR in is not being created in parallel to the Roslyn PR, please ensure that a new doc issue is filed in
dotnet/docs
repo to track this work.
- If you creating a Roslyn PR for an IDE analyzer:
-
No action required in Roslyn repo: Help links have been hooked up to IDE code style analyzers in Roslyn repo in the base analyzer types, so every new IDE analyzer diagnostic ID will automatically have
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ideXXXX
as its help link. There is no action required on the Roslyn PR to ensure this linking.
If you feel any of the existing IDE rule docs have insufficient or incorrect information, please submit a PR to dotnet/docs repo to update the documentation.