Trellis.Analyzers 3.0.0-alpha.303

This is a prerelease version of Trellis.Analyzers.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Trellis.Analyzers --version 3.0.0-alpha.303
                    
NuGet\Install-Package Trellis.Analyzers -Version 3.0.0-alpha.303
                    
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="Trellis.Analyzers" Version="3.0.0-alpha.303" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Trellis.Analyzers" Version="3.0.0-alpha.303" />
                    
Directory.Packages.props
<PackageReference Include="Trellis.Analyzers" />
                    
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 Trellis.Analyzers --version 3.0.0-alpha.303
                    
#r "nuget: Trellis.Analyzers, 3.0.0-alpha.303"
                    
#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 Trellis.Analyzers@3.0.0-alpha.303
                    
#: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=Trellis.Analyzers&version=3.0.0-alpha.303&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Trellis.Analyzers&version=3.0.0-alpha.303&prerelease
                    
Install as a Cake Tool

Trellis.Analyzers

NuGet Package

Roslyn analyzers that keep Trellis usage safe, idiomatic, and review-friendly.

Installation

dotnet add package Trellis.Analyzers

Quick Example

using Trellis;

Result<int> Parse(string text) => Result.Ok(text.Length);

// TRLS002 recommends Bind instead of Map when the lambda returns Result<T>.
var result = Parse("abc")
    .Bind(length => Result.Ok(length + 1));

Key Features

  • Flags unsafe Maybe.Value access as an error (TRLS003).
  • Catches async misuse, double-wrapped results, and common ROP anti-patterns (TRLS001/004/005/007/009/010).
  • Catches unsafe Result<T> deconstruction reads, default(Result/Maybe) literals, and [OwnedEntity] init-only properties (TRLS018, TRLS019, TRLS022).
  • Flags composite value objects exposed through request/response DTOs without CompositeValueObjectJsonConverter<T> (TRLS020).
  • Flags redundant EF Core HasConversion, OwnsOne, and Ignore mappings for Trellis convention-owned properties (TRLS021).
  • Includes fixes for Trellis-specific issues such as SaveChangesAsync vs. SaveChangesResultAsync.
  • See the API reference for the full diagnostic list (TRLS001–TRLS022 + generator IDs TRLS031–TRLS039).

Documentation

Part of Trellis

This package is part of the Trellis framework.

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
3.0.0-alpha.304 57 5/29/2026
3.0.0-alpha.303 53 5/29/2026
3.0.0-alpha.158 96 4/5/2026
3.0.0-alpha.157 57 4/4/2026
3.0.0-alpha.140 75 3/30/2026
3.0.0-alpha.137 75 3/27/2026
3.0.0-alpha.135 54 3/26/2026
3.0.0-alpha.127 68 3/23/2026
3.0.0-alpha.123 68 3/19/2026
3.0.0-alpha.118 80 3/14/2026
3.0.0-alpha.111 67 3/12/2026
3.0.0-alpha.104 81 3/9/2026
3.0.0-alpha.100 58 3/4/2026
3.0.0-alpha.99 58 3/4/2026
3.0.0-alpha.98 57 3/3/2026
3.0.0-alpha.95 60 3/2/2026
3.0.0-alpha.94 58 3/2/2026
3.0.0-alpha.93 61 3/1/2026
3.0.0-alpha.92 82 2/28/2026
3.0.0-alpha.83 58 2/27/2026