fix: add assertion analyzers for common mistakes (prefer IsNull, IsTrue/IsFalse) - #4944
#4944Merged
thomhurst merged 1 commit intoFeb 19, 2026
mainthomhurst/TUnit:mainfrom
fix/assertion-analyzers-v2thomhurst/TUnit:fix/assertion-analyzers-v2Copy head branch name to clipboard
Merged
fix: add assertion analyzers for common mistakes (prefer IsNull, IsTrue/IsFalse)#4944thomhurst merged 1 commit intomainthomhurst/TUnit:mainfrom fix/assertion-analyzers-v2thomhurst/TUnit:fix/assertion-analyzers-v2Copy head branch name to clipboard
thomhurst merged 1 commit into
mainthomhurst/TUnit:mainfrom
fix/assertion-analyzers-v2thomhurst/TUnit:fix/assertion-analyzers-v2Copy head branch name to clipboard
Conversation
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 06:55 — with
GitHub Actions
Inactive
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 06:55 — with
GitHub Actions
Inactive
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 06:55 — with
GitHub Actions
Inactive
Contributor
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. The two new Roslyn analyzers (
|
thomhurst
force-pushed
the
fix/assertion-analyzers-v2
branch
from
February 19, 2026 08:04
8028b46 to
f5133ca
Compare
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 08:04 — with
GitHub Actions
Failure
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 08:04 — with
GitHub Actions
Failure
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 08:04 — with
GitHub Actions
Failure
thomhurst
force-pushed
the
fix/assertion-analyzers-v2
branch
from
February 19, 2026 09:38
f5133ca to
484573c
Compare
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 09:38 — with
GitHub Actions
Failure
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 09:38 — with
GitHub Actions
Failure
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 09:38 — with
GitHub Actions
Failure
Add two new analyzer rules to TUnit.Assertions.Analyzers: - TUnitAssertions0014: Prefer IsNull() over IsEqualTo(null) for clearer intent and better error messages - TUnitAssertions0015: Prefer IsTrue()/IsFalse() over IsEqualTo(true/false) for clearer intent and better error messages Both rules are Warning severity and include full test coverage. Closes #4874
thomhurst
force-pushed
the
fix/assertion-analyzers-v2
branch
from
February 19, 2026 11:46
484573c to
09cb81a
Compare
thomhurst
had a problem deploying
to
Pull Requests
February 19, 2026 11:46 — with
GitHub Actions
Failure
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 11:46 — with
GitHub Actions
Inactive
thomhurst
temporarily deployed
to
Pull Requests
February 19, 2026 11:46 — with
GitHub Actions
Inactive
This was referenced Feb 22, 2026
Closed
This was referenced Mar 27, 2026
This was referenced Apr 4, 2026
This was referenced Apr 13, 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.
Closes #4874. Adds TUnitAssertions0014 and TUnitAssertions0015. 56/56 tests passing.