Remove duplicate test cases in MultithreadableTaskAnalyzer#13483
Merged
JanProvaznik merged 1 commit intomainfrom Apr 2, 2026
Merged
Remove duplicate test cases in MultithreadableTaskAnalyzer#13483JanProvaznik merged 1 commit intomainfrom
JanProvaznik merged 1 commit intomainfrom
Conversation
The deleted test methods are already tested in MultiThreadableTaskCodeFixProviderTests which covers both the analyzer and the codefix
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces redundant unit test coverage in the ThreadSafeTaskAnalyzer test suite by removing analyzer-only test cases that are already exercised via the code-fix test harness, and it slightly simplifies test code by using an unqualified Roslyn severity enum.
Changes:
- Removed duplicate analyzer test methods that are already covered by
MultiThreadableTaskCodeFixProviderTests(which validates both analyzer diagnostics and code fixes). - Simplified
DiagnosticSeverityusage in code-fix tests by adding aMicrosoft.CodeAnalysisusing and dropping the fully-qualified reference.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/ThreadSafeTaskAnalyzer.Tests/MultiThreadableTaskCodeFixProviderTests.cs |
Adds Microsoft.CodeAnalysis import and uses DiagnosticSeverity.Warning directly in the helper that builds expected diagnostics. |
src/ThreadSafeTaskAnalyzer.Tests/MultiThreadableTaskAnalyzerTests.cs |
Deletes analyzer-only tests for scenarios that are already validated through code-fix tests, reducing duplication. |
JanProvaznik
approved these changes
Apr 2, 2026
dfederm
pushed a commit
to dfederm/msbuild
that referenced
this pull request
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The deleted test methods are already tested in MultiThreadableTaskCodeFixProviderTests which covers both the analyzer and the codefix.