JAAvila.FluentOperations.Analyzers
1.5.0
dotnet add package JAAvila.FluentOperations.Analyzers --version 1.5.0
NuGet\Install-Package JAAvila.FluentOperations.Analyzers -Version 1.5.0
<PackageReference Include="JAAvila.FluentOperations.Analyzers" Version="1.5.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="JAAvila.FluentOperations.Analyzers" Version="1.5.0" />
<PackageReference Include="JAAvila.FluentOperations.Analyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add JAAvila.FluentOperations.Analyzers --version 1.5.0
#r "nuget: JAAvila.FluentOperations.Analyzers, 1.5.0"
#:package JAAvila.FluentOperations.Analyzers@1.5.0
#addin nuget:?package=JAAvila.FluentOperations.Analyzers&version=1.5.0
#tool nuget:?package=JAAvila.FluentOperations.Analyzers&version=1.5.0
JAAvila.FluentOperations.Analyzers
Roslyn analyzers for JAAvila.FluentOperations.
This package provides compile-time diagnostics that detect common misuse patterns of the FluentOperations API.
Installation
dotnet add package JAAvila.FluentOperations.Analyzers
The package is a development-only dependency (DevelopmentDependency = true). It adds no runtime assemblies to your project.
Diagnostics
FO001 — Dangling .Test() chain (Warning)
Reported when .Test() is called as a standalone statement without chaining any assertion operation. The manager result is discarded and no validation is performed.
Incorrect:
email.Test(); // FO001 — no assertion chained
Correct:
email.Test().NotBeNull().BeEmail();
FO003 — Define() without using (Warning)
Reported when Define() is called inside a QualityBlueprint<T> constructor without wrapping it in a using statement. Without using, the rule-capture scope is never disposed, which can cause rules to leak into subsequently constructed blueprints.
A code fix is available: select Wrap Define() in using statement to automatically refactor the code.
Incorrect:
public class UserBlueprint : QualityBlueprint<User>
{
public UserBlueprint()
{
Define(); // FO003 — not wrapped in using
For(x => x.Email).Test().NotBeNull();
}
}
Correct:
public class UserBlueprint : QualityBlueprint<User>
{
public UserBlueprint()
{
using (Define())
{
For(x => x.Email).Test().NotBeNull();
}
}
}
The following using forms are all recognized as valid:
using (Define()) { ... } // parenthesized using
using (var scope = Define()) { ... } // with variable
using var scope = Define(); // declaration using (C# 8+)
License
Apache-2.0
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.0 | 157 | 3/29/2026 |
| 1.3.0 | 110 | 3/26/2026 |
| 1.1.0 | 117 | 3/21/2026 |
| 1.0.1-alpha.0.2 | 63 | 3/21/2026 |