Skip to content

Analyzer catalog hygiene: retire MSTEST0039 constant and replace unactionable TODOs#8092

Merged
Evangelink merged 2 commits into
mainfrom
copilot/improve-analyzer-catalog-hygiene
May 11, 2026
Merged

Analyzer catalog hygiene: retire MSTEST0039 constant and replace unactionable TODOs#8092
Evangelink merged 2 commits into
mainfrom
copilot/improve-analyzer-catalog-hygiene

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

Bug Fix

The analyzer catalog had an inconsistency where removed rule MSTEST0039 was still exposed as an active constant, and several TODOs in high-churn areas were empty or too vague to act on. This change aligns rule-ID lifecycle handling and converts unactionable TODOs into explicit, tracked follow-ups.

  • Analyzer ID catalog hygiene

    • Commented out UseNewerAssertThrowsRuleId (MSTEST0039) in DiagnosticIds.cs using the same non-reuse convention as other removed rules.
  • TODO triage in targeted components

    • Replaced empty TODO placeholders in:
      • SimplifiedConsoleOutputDeviceBase.cs
      • TrxProcessLifetimeHandler.cs
    • Added tracking context (#8086) to vague TODOs in:
      • CommandLineHandler.cs
      • CommonTestHost.cs
      • ITestHostProcessInformation.cs
      • TestDataSource.cs
      • TestDeploymentTests.cs
      • TestMethodRunnerTests.cs
  • Analyzer release catalog check

    • Verified the reported USage typos in AnalyzerReleases.Shipped.md were already corrected in the current branch (Usage), so no additional edit was needed there.
// public const string UseNewerAssertThrowsRuleId = "MSTEST0039"; - // Don't remove this commented out line, and don't reuse this ID.

// Tracked by https://github.com/microsoft/testfx/issues/8086:
// file artifacts are currently ignored by this output device.

Copilot AI self-assigned this May 11, 2026
Copilot AI review requested due to automatic review settings May 11, 2026 09:03
Copilot AI review requested due to automatic review settings May 11, 2026 09:03
Copilot AI linked an issue May 11, 2026 that may be closed by this pull request
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 11, 2026 09:16
Copilot AI changed the title [WIP] Fix analyzer catalog hygiene issues for MSTest rules Analyzer catalog hygiene: retire MSTEST0039 constant and replace unactionable TODOs May 11, 2026
Copilot AI requested a review from Evangelink May 11, 2026 09:17
@Evangelink Evangelink marked this pull request as ready for review May 11, 2026 12:42
Copilot AI review requested due to automatic review settings May 11, 2026 12:42
@Evangelink Evangelink merged commit d8293b5 into main May 11, 2026
11 of 12 checks passed
@Evangelink Evangelink deleted the copilot/improve-analyzer-catalog-hygiene branch May 11, 2026 12:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 improves hygiene across the MSTest analyzer catalog and a few targeted components by (1) ensuring removed analyzer IDs aren’t accidentally reused and (2) converting empty/vague TODOs into actionable, issue-tracked follow-ups (Issue #8086).

Changes:

  • Commented out the removed MSTEST0039 diagnostic ID constant (UseNewerAssertThrowsRuleId) to match the established “do not reuse this ID” convention.
  • Replaced empty TODO placeholders with specific, issue-tracked explanatory comments (notably in console output and TRX process lifetime handling).
  • Added Issue #8086 tracking context to several existing TODOs in platform, adapter, and unit test code.
Show a summary per file
File Description
test/UnitTests/MSTestAdapter.PlatformServices.UnitTests/Services/TestDeploymentTests.cs Annotates a TODO with Issue #8086 so the flaky/non-mocked deployment test follow-up is trackable.
test/UnitTests/MSTestAdapter.PlatformServices.UnitTests/Execution/TestMethodRunnerTests.cs Adds Issue #8086 tracking to an existing TODO about exception type refinement.
src/Platform/Microsoft.Testing.Platform/TestHostControllers/ITestHostProcessInformation.cs Adds Issue #8086 tracking to an API follow-up TODO (rename/obsolete plan).
src/Platform/Microsoft.Testing.Platform/OutputDevice/SimplifiedConsoleOutputDeviceBase.cs Replaces empty TODOs with concrete, issue-tracked notes about ignored/surfacing file artifacts.
src/Platform/Microsoft.Testing.Platform/Hosts/CommonTestHost.cs Adds Issue #8086 tracking to an existing TODO about reachability/disable sequencing.
src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineHandler.cs Adds Issue #8086 tracking to TODOs about abstracting Assembly and RuntimeInformation.
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs Replaces an empty TODO with an issue-tracked explanation of the TRX/exit-code mismatch scenario.
src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticIds.cs Comments out MSTEST0039 constant to align with removed-rule ID lifecycle handling.
src/Adapter/MSTestAdapter.PlatformServices/Services/TestDataSource.cs Adds Issue #8086 tracking to an exception-type TODO in the data source error path.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 0

Evangelink added a commit that referenced this pull request May 12, 2026
…tionable TODOs (#8092)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repository Quality: Analyzer Catalog Hygiene Improvements

3 participants