fluentassertions.analyzers
fluentassertions.analyzers copied to clipboard
Analyzers based on the FluentAssertions best practices docs
Consider adding support for debugging through Visual Studio
The default Roslyn analyzer template allows one to run the analyzer in a Visual Studio Debug instance, which makes debugging your analyzers incredibly easy. This project does not have Visual...
https://github.com/fluentassertions/fluentassertions/blob/5.2.0/docs/_data/tips/nullables.yml
Missing negation when transforming OnlyContain
When applying the codefix for `CollectionShouldNotContainProperty`, the comparison inside the lambda should also be negated. ```c# actual.Should().OnlyContain(x => x.OtherProperty == expectedValue); // before actual.Should().NotContain(x => x.OtherProperty == expectedValue); // after...
Test cases
Nice project! I've attached a project with failing tests for all the before and after examples I listed in the Fluent Assertions docs. [UnitTests2.zip](https://github.com/Meir017/FluentAssertions.BestPractices/files/1367205/UnitTests2.zip)
### Description I added fluentassertions.analyzers to a solution (with >100 projects) that I can I fix/improve my assertions. But based on the missing common prefix in the DiagnosticId/Code it is...
Rewrite order when handling `Assert.AreEqual`
First or all, thank you for this project, looks very useful. Second, sorry if this is a duplicate, I've tried to look around in the open or closed issues. ###...
### Description I find that the analyzers should warn people if they say `.Should().ThrowAsync()` and similar, without actually awaiting the task produced by Fluent Assertions. ### Complete minimal example reproducing...
for this https://github.com/shouldly/shouldly
see https://github.com/fluentassertions/fluentassertions/pull/2422/files