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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JAAvila.FluentOperations.Analyzers" Version="1.5.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JAAvila.FluentOperations.Analyzers" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="JAAvila.FluentOperations.Analyzers">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JAAvila.FluentOperations.Analyzers --version 1.5.0
                    
#r "nuget: JAAvila.FluentOperations.Analyzers, 1.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JAAvila.FluentOperations.Analyzers@1.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JAAvila.FluentOperations.Analyzers&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=JAAvila.FluentOperations.Analyzers&version=1.5.0
                    
Install as a Cake Tool

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

There are no supported framework assets in this package.

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