Update analyzer rules docs stuff - #84481
Conversation
|
Thanks @gewarren! Let me know when you are done updating and I can help get this in. |
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
Thanks @JoeRobich, this is ready now. |
There was a problem hiding this comment.
Pull request overview
This PR tightens up diagnostic help-link behavior by ensuring several previously-exempt diagnostics now provide valid HelpLinkUri values (pointing at the appropriate Learn/VS reference pages), and it correspondingly trims the “missing documentation” tracking list once those links are considered documented/valid.
Changes:
- Add
helpLinkUriwiring for IDE1007 (unbound identifier) and IDE0043 (format string validation) viaDiagnosticHelper.GetHelpLinkForDiagnosticId. - Update
DiagnosticHelper.GetHelpLinkForDiagnosticIdto return concrete documentation URLs forRE0001andJSON00xdiagnostics. - Update help-link validation tests and reduce
RulesMissingDocumentation.mdto the remaining undocumentable/hidden diagnostics.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Features/RulesMissingDocumentation.md | Prunes the tracking list to only diagnostics still lacking applicable docs/help links. |
| src/Features/Core/Portable/Diagnostics/Analyzers/UnboundIdentifiersDiagnosticAnalyzerBase.cs | Ensures IDE1007 descriptors get a HelpLinkUri from DiagnosticHelper. |
| src/EditorFeatures/Test/Diagnostics/IDEDiagnosticIDConfigurationTests.cs | Updates expected help-link mappings (notably for RE/JSON) and removes prior exemptions. |
| src/EditorFeatures/DiagnosticsTestUtilities/Diagnostics/AbstractDiagnosticProviderBasedUserDiagnosticTest.cs | Removes help-link exemptions so tests require non-empty HelpLinkUri where appropriate. |
| src/Analyzers/Core/Analyzers/ValidateFormatString/AbstractValidateFormatStringDiagnosticAnalyzer.cs | Ensures IDE0043 descriptors get a HelpLinkUri from DiagnosticHelper. |
| src/Analyzers/Core/Analyzers/Helpers/DiagnosticHelper.cs | Returns real documentation links for RE0001/JSON* and keeps IDE* routed to style-rules pages. |
Removed checks for undocumented diagnostic IDs in tests.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/Analyzers/Core/Analyzers/ValidateFormatString/AbstractValidateFormatStringDiagnosticAnalyzer.cs:33
- The comment has a subject/verb agreement issue ("classes mentioned doesn't"). Since this line was updated in the PR, please rephrase it to be grammatically correct.
#pragma warning disable RS0030 // Do not used banned APIs - We cannot use AbstractBuiltInCodeStyleDiagnosticAnalyzer nor AbstractCodeQualityDiagnosticAnalyzer.
// This analyzer is run against generated code while the abstract base classes mentioned don't.
private static readonly DiagnosticDescriptor Rule = new(
Fixes dotnet/docs#53369.
Microsoft Reviewers: Open in CodeFlow