You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This report covers the hygiene of the MSTest analyzer catalog β the set of files that define, document, and track the 63 diagnostic rule IDs (MSTEST0001βMSTEST0063). Three specific areas were found requiring attention:
A removed rule's constant was not commented out: MSTEST0039 (UseNewerAssertThrowsRuleId) is still declared as an active public const string in DiagnosticIds.cs, while the three other rules removed in Release 4.0.0 (MSTEST0006, MSTEST0034, MSTEST0053) are properly commented out with a "don't reuse this ID" note. This inconsistency leaves a risk of unintentional ID reuse.
Three typos in AnalyzerReleases.Shipped.md: Lines 19β21 record the category as "USage" instead of "Usage" for MSTEST0023, MSTEST0037, and MSTEST0045. While not functional, these represent inaccurate release documentation.
71 TODO/FIXME comments in production source across 11 components, with the highest concentrations in Microsoft.Testing.Platform (18), MSTestAdapter.PlatformServices (18), and Microsoft.Testing.Extensions.TrxReport (14). Several of these are vague or even empty (// TODO: with no content), making them unactionable noise.
Removed rules properly commented out in DiagnosticIds.cs
3 of 4
β οΈ
Typos in AnalyzerReleases.Shipped.md
3 ("USage")
β οΈ
Analyzer implementation files
54
β
Suppressor implementation files
5
β
TODO/FIXME comments in production src/
71
β οΈ
Source files with TODO/FIXME
~55
β οΈ
Empty/vague TODOs (e.g., // TODO:)
Several
β
Findings
Strengths
All active analyzer rules have implementations
Help links are auto-generated consistently via DiagnosticDescriptorHelper pointing to learn.microsoft.com
Removed rules are documented in AnalyzerReleases.Shipped.md under "Removed Rules" in Release 4.0.0
The DiagnosticIds.cs commenting convention (with a "don't reuse" warning) is well-established for 3 of 4 removed rules
Areas for Improvement
MSTEST0039 constant not commented out (Medium severity)
In src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticIds.cs:
// β These are correctly commented out:// public const string AvoidExpectedExceptionAttributeRuleId = "MSTEST0006"; - // Don't remove...// public const string UseClassCleanupBehaviorEndOfClassRuleId = "MSTEST0034"; - // Don't remove...// public const string AvoidAssertFormatParametersRuleId = "MSTEST0053"; - // Don't remove...// β This was also removed in 4.0.0 but is still active:publicconststringUseNewerAssertThrowsRuleId="MSTEST0039";
```
**Typosinreleasetracking document**(Lowseverity)
`src/Analyzers/MSTest.Analyzers/AnalyzerReleases.Shipped.md`, lines 19β21:
```
MSTEST0023|USage|Info|Usage|Warning| ... β "USage"should be "Usage"MSTEST0037|USage|Info|Usage|Warning| ... β "USage"should be "Usage"MSTEST0045|USage|Info|Usage|Warning| ... β "USage"should be "Usage"
TODO/FIXME comments distribution in production source (Medium severity)
src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs: // TODO (no colon, no content, two occurrences)
π€ Suggested Improvement Tasks
Task 1: Comment out MSTEST0039 in DiagnosticIds.cs
Priority: Medium Estimated Effort: Small
MSTEST0039 (UseNewerAssertThrowsRuleId) was removed in Release 4.0.0 but its constant in src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticIds.cs is still active, unlike the three other rules removed in the same release. It should follow the same commenting convention:
// public const string UseNewerAssertThrowsRuleId = "MSTEST0039"; - // Don't remove this commented out line, and don't reuse this ID.
File: src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticIds.cs, line 46
Task 2: Fix "USage" typos in AnalyzerReleases.Shipped.md
Priority: Low Estimated Effort: Small
Three lines in the Release 4.1.0 "Changed Rules" section use USage instead of Usage for the New Category column. These should be corrected:
Task 3: Resolve or convert empty/vague TODO comments into tracked issues
Priority: Medium Estimated Effort: Small
Several TODO comments have no description or are too vague to act on. Each should either be given a concrete description or replaced with a tracked GitHub issue reference. The following are the most egregious examples:
src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs β multiple // TODO: and // TODO comments with no content
For each empty TODO: either fill in a meaningful description, link to an existing issue, or remove it if no longer relevant.
Task 4: Audit and triage Microsoft.Testing.Platform and MSTestAdapter.PlatformServices TODO comments
Priority: Medium Estimated Effort: Medium
The two components with the most TODO/FIXME comments (18 each) warrant a focused triage:
Microsoft.Testing.Platform TODOs include:
CommandLineHandler.cs: "Replace Assembly with IAssembly" and "Replace RuntimeInformation with IRuntimeInformation" β these are architectural improvements that should be tracked
CommonTestHost.cs: "Is this reachable? If so, are we missing await baseMessageBus.DisableAsync() here?" β potential bug
ITestHostProcessInformation.cs: "As a follow-up, obsolete this property as error, and rename it..." β a deliberate planned deprecation that should be an issue
TerminalOutputDevice.cs: "Replace this with proper CI detection that we already have in telemetry. Add CIConditionAttributeΒ #5533 (comment)" β linked to an existing issue, could be removed once resolved
MSTestAdapter.PlatformServices TODOs include:
TestDeploymentTests.cs: "This test has to have mocks" β test quality improvement
TestMethodRunnerTests.cs: "Fix exception type"
Each TODO should be converted to a GitHub issue or removed if no longer relevant.
Task 5: Audit Microsoft.Testing.Extensions.TrxReport TODO comments
Priority: Low Estimated Effort: SmallβMedium
Microsoft.Testing.Extensions.TrxReport has 14 TODO/FIXME comments β the highest concentration in any single extension. This warrants a focused review to determine which represent actual planned work vs. outdated notes.
π― Repository Quality Improvement Report β Analyzer Catalog Hygiene
Analysis Date: 2026-05-11
Focus Area: Analyzer Catalog Hygiene (Custom)
Strategy Type: Custom β repository-specific focus on the MSTest Roslyn analyzer ecosystem
Executive Summary
This report covers the hygiene of the MSTest analyzer catalog β the set of files that define, document, and track the 63 diagnostic rule IDs (MSTEST0001βMSTEST0063). Three specific areas were found requiring attention:
A removed rule's constant was not commented out: MSTEST0039 (
UseNewerAssertThrowsRuleId) is still declared as an activepublic const stringinDiagnosticIds.cs, while the three other rules removed in Release 4.0.0 (MSTEST0006, MSTEST0034, MSTEST0053) are properly commented out with a "don't reuse this ID" note. This inconsistency leaves a risk of unintentional ID reuse.Three typos in
AnalyzerReleases.Shipped.md: Lines 19β21 record the category as"USage"instead of"Usage"for MSTEST0023, MSTEST0037, and MSTEST0045. While not functional, these represent inaccurate release documentation.71 TODO/FIXME comments in production source across 11 components, with the highest concentrations in
Microsoft.Testing.Platform(18),MSTestAdapter.PlatformServices(18), andMicrosoft.Testing.Extensions.TrxReport(14). Several of these are vague or even empty (// TODO:with no content), making them unactionable noise.Full Analysis Report
Focus Area: Analyzer Catalog Hygiene
Current State Assessment
Metrics Collected:
src/// TODO:)Findings
Strengths
DiagnosticDescriptorHelperpointing tolearn.microsoft.comAnalyzerReleases.Shipped.mdunder "Removed Rules" in Release 4.0.0DiagnosticIds.cscommenting convention (with a "don't reuse" warning) is well-established for 3 of 4 removed rulesAreas for Improvement
MSTEST0039 constant not commented out (Medium severity)
In
src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticIds.cs:TODO/FIXME comments distribution in production source (Medium severity)
Microsoft.Testing.PlatformMSTestAdapter.PlatformServicesMicrosoft.Testing.Extensions.TrxReportMSTest.AnalyzersMSTest.SourceGenerationMSTest.TestAdapterMicrosoft.Testing.Extensions.VSTestBridgeNotable empty/vague TODOs:
src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs:// TODO:(empty)src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs:// TODO(no colon, no content, two occurrences)π€ Suggested Improvement Tasks
Task 1: Comment out MSTEST0039 in
DiagnosticIds.csPriority: Medium
Estimated Effort: Small
MSTEST0039 (
UseNewerAssertThrowsRuleId) was removed in Release 4.0.0 but its constant insrc/Analyzers/MSTest.Analyzers/Helpers/DiagnosticIds.csis still active, unlike the three other rules removed in the same release. It should follow the same commenting convention:// public const string UseNewerAssertThrowsRuleId = "MSTEST0039"; - // Don't remove this commented out line, and don't reuse this ID.File:
src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticIds.cs, line 46Task 2: Fix "USage" typos in
AnalyzerReleases.Shipped.mdPriority: Low
Estimated Effort: Small
Three lines in the Release 4.1.0 "Changed Rules" section use
USageinstead ofUsagefor theNew Categorycolumn. These should be corrected:File:
src/Analyzers/MSTest.Analyzers/AnalyzerReleases.Shipped.md, lines 19β21Task 3: Resolve or convert empty/vague TODO comments into tracked issues
Priority: Medium
Estimated Effort: Small
Several TODO comments have no description or are too vague to act on. Each should either be given a concrete description or replaced with a tracked GitHub issue reference. The following are the most egregious examples:
src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.csβ multiple// TODO:and// TODOcomments with no content// TODO:with no text after the colonSearch command:
grep -rn "// TODO:\?\s*$" --include="*.cs" src/For each empty TODO: either fill in a meaningful description, link to an existing issue, or remove it if no longer relevant.
Task 4: Audit and triage
Microsoft.Testing.PlatformandMSTestAdapter.PlatformServicesTODO commentsPriority: Medium
Estimated Effort: Medium
The two components with the most TODO/FIXME comments (18 each) warrant a focused triage:
Microsoft.Testing.PlatformTODOs include:CommandLineHandler.cs: "Replace Assembly with IAssembly" and "Replace RuntimeInformation with IRuntimeInformation" β these are architectural improvements that should be trackedCommonTestHost.cs: "Is this reachable? If so, are we missing await baseMessageBus.DisableAsync() here?" β potential bugITestHostProcessInformation.cs: "As a follow-up, obsolete this property as error, and rename it..." β a deliberate planned deprecation that should be an issueTerminalOutputDevice.cs: "Replace this with proper CI detection that we already have in telemetry. AddCIConditionAttributeΒ #5533 (comment)" β linked to an existing issue, could be removed once resolvedMSTestAdapter.PlatformServicesTODOs include:TestDeploymentTests.cs: "This test has to have mocks" β test quality improvementTestMethodRunnerTests.cs: "Fix exception type"Each TODO should be converted to a GitHub issue or removed if no longer relevant.
Task 5: Audit
Microsoft.Testing.Extensions.TrxReportTODO commentsPriority: Low
Estimated Effort: SmallβMedium
Microsoft.Testing.Extensions.TrxReporthas 14 TODO/FIXME comments β the highest concentration in any single extension. This warrants a focused review to determine which represent actual planned work vs. outdated notes.Run the following to inspect them all:
Each comment should be converted to a GitHub issue, documented with a decision not to fix, or removed.
π Historical Context
Previous Focus Areas
π― Recommendations
Immediate Actions (This Week)
Short-term Actions (This Month)
Generated by Repository Quality Improvement Agent
Next analysis: 2026-05-12 β Focus area will be selected based on diversity algorithm