Add applicable languages to CA and IDE code analysis rule documentation#52773
Add applicable languages to CA and IDE code analysis rule documentation#52773
Conversation
…tation Agent-Logs-Url: https://github.com/dotnet/docs/sessions/4d60f1ea-6655-48f1-8808-7c8e15eccd50 Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
|
@copilot can you resolve the merge conflict in docs/fundamentals/code-analysis/quality-rules/ca2227.md. |
…pplicable languages row Agent-Logs-Url: https://github.com/dotnet/docs/sessions/76230132-17e1-479d-8549-7e818f206cb7 Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Resolved in commit |
BillWagner
left a comment
There was a problem hiding this comment.
I'll admit I didn't check every rule, but spot checked many of them.
This LGTM.
Note to reviewers: Hide whitespace.
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
BillWagner
left a comment
There was a problem hiding this comment.
I have two sets of changes to make this build correctly.
docs/fundamentals/code-analysis/includes/applicable-languages-csharp-8.0.md
Outdated
Show resolved
Hide resolved
docs/fundamentals/code-analysis/includes/applicable-languages-csharp-9.0.md
Outdated
Show resolved
Hide resolved
…use csharp-8 and csharp-9 Agent-Logs-Url: https://github.com/dotnet/docs/sessions/a4bbba80-c77f-4448-a785-8a2a000d54b0 Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
gewarren
left a comment
There was a problem hiding this comment.
I'm not crazy about using include files for these. Do you think it's a good idea?
@gewarren I thought that would remove duplication, with only a few phrases needed. I don't have strong feelings either way. Easy to tell copilot to switch it. |
|
@copilot Per the discussion above, update this PR to place the text for applicable language inline in each article, and remove the include files added in this PR. |
…nclude files Agent-Logs-Url: https://github.com/dotnet/docs/sessions/07609c45-9d95-46c0-bafb-c533994a8507 Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Done in commit |
|
@copilot Many of the assignments to language are incorrect. You'll need to look in this file to find the correct answer: https://github.com/dotnet/sdk/blob/main/src/Microsoft.CodeAnalysis.NetAnalyzers/src/Microsoft.CodeAnalysis.NetAnalyzers.sarif The Make the necessary updates. |
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/d2a51090-5663-4ecf-bba2-d90c84965042 Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Fixed in commit
|
CA quality rules lacked any indication of which .NET languages they apply to, unlike IDE style rules which had the info but as inconsistent hard-coded text.
Approach
CA rules (336 files)
Added
| **Applicable languages** |row to every CA rule property table, sourcing the language fromdev_langsfrontmatter. Rules withoutdev_langsdefault to C# and Visual Basic (consistent with the issue comment that most rules apply to both).IDE rules (119 files)
Added or standardized
| **Applicable languages** |rows with inline language text.The language text used across all files:
C# and Visual Basic— rules applying to both languagesC#— C#-only rulesVisual Basic— VB-only rulesC# 8+,C# 9+,C# 11+,C# 12+,C# 13+,C# 14+— version-specific C# rulesF#— F#-only rulesInternal previews
Note
This table shows preview links for the 30 files with the most changes. For preview links for other files in this PR, select OpenPublishing.Build Details within checks.
Internal previews
Toggle expand/collapse
Note
This table shows preview links for the 30 files with the most changes. For preview links for other files in this PR, select OpenPublishing.Build Details within checks.