Skip to content

Update analyzer rules docs stuff - #84481

Merged
JoeRobich merged 6 commits into
dotnet:mainfrom
gewarren:rules-file
Jul 20, 2026
Merged

Update analyzer rules docs stuff#84481
JoeRobich merged 6 commits into
dotnet:mainfrom
gewarren:rules-file

Conversation

@gewarren

@gewarren gewarren commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Fixes dotnet/docs#53369.

Microsoft Reviewers: Open in CodeFlow

@JoeRobich

Copy link
Copy Markdown
Member

Thanks @gewarren! Let me know when you are done updating and I can help get this in.

@gewarren
gewarren marked this pull request as ready for review July 19, 2026 16:19
Copilot AI review requested due to automatic review settings July 19, 2026 16:19
@gewarren
gewarren requested a review from a team as a code owner July 19, 2026 16:19
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@gewarren

Copy link
Copy Markdown
Contributor Author

Thanks @JoeRobich, this is ready now.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 helpLinkUri wiring for IDE1007 (unbound identifier) and IDE0043 (format string validation) via DiagnosticHelper.GetHelpLinkForDiagnosticId.
  • Update DiagnosticHelper.GetHelpLinkForDiagnosticId to return concrete documentation URLs for RE0001 and JSON00x diagnostics.
  • Update help-link validation tests and reduce RulesMissingDocumentation.md to 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.
Copilot AI review requested due to automatic review settings July 20, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread src/Analyzers/Core/Analyzers/Helpers/DiagnosticHelper.cs Outdated
Copilot AI review requested due to automatic review settings July 20, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(

Copilot AI review requested due to automatic review settings July 20, 2026 21:01

@JoeRobich JoeRobich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gewarren!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread src/Features/RulesMissingDocumentation.md
@JoeRobich
JoeRobich enabled auto-merge (squash) July 20, 2026 21:24
@JoeRobich
JoeRobich merged commit 258ced1 into dotnet:main Jul 20, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document missing IDExxxx rules

3 participants