Skip to content

Disable MSTEST0067 by default#8678

Merged
Evangelink merged 1 commit into
microsoft:mainfrom
Evangelink:dev/amauryleve/mstest0067-disabled-by-default
May 29, 2026
Merged

Disable MSTEST0067 by default#8678
Evangelink merged 1 commit into
microsoft:mainfrom
Evangelink:dev/amauryleve/mstest0067-disabled-by-default

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Downgrades the effective severity of MSTEST0067 (AvoidThreadSleepAndTaskWaitInTestsAnalyzer) by switching isEnabledByDefault from true to false.

Why

MSTEST0067 was introduced in #8646 with DefaultSeverity = Info and isEnabledByDefault = true. With those settings the AnalyzerSeverityDecider elevates it to Warning in Recommended mode (the default MSTest analysis mode) and in All mode — which is more intrusive than intended for this stylistic guidance.

Marking the rule as not enabled by default keeps the default severity at Info and ensures it only surfaces in All mode, where users explicitly opt into the most aggressive analyzer set. The rule remains fully available and can be turned on individually via .editorconfig.

Changes

  • AvoidThreadSleepAndTaskWaitInTestsAnalyzer.cs: isEnabledByDefault: truefalse.
  • AnalyzerReleases.Unshipped.md: severity column for MSTEST0067 updated from Info to Disabled to match the convention used for other opt-in rules (e.g. MSTEST0021, MSTEST0026).

MSTEST0067 (AvoidThreadSleepAndTaskWaitInTestsAnalyzer) was enabled by default with Info severity, which causes the AnalyzerSeverityDecider to elevate it to Warning in the Recommended analysis mode (the default MSTest mode). To keep it discoverable but opt-in, switch isEnabledByDefault to false so the rule only surfaces in the All analysis mode while remaining at Info severity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 29, 2026 07:57
@Evangelink Evangelink merged commit c7bd09f into microsoft:main May 29, 2026
17 of 26 checks passed
@Evangelink Evangelink deleted the dev/amauryleve/mstest0067-disabled-by-default branch May 29, 2026 08:00

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants