Trellis.Analyzers
3.0.0-alpha.721
dotnet add package Trellis.Analyzers --version 3.0.0-alpha.721
NuGet\Install-Package Trellis.Analyzers -Version 3.0.0-alpha.721
<PackageReference Include="Trellis.Analyzers" Version="3.0.0-alpha.721" />
<PackageVersion Include="Trellis.Analyzers" Version="3.0.0-alpha.721" />
<PackageReference Include="Trellis.Analyzers" />
paket add Trellis.Analyzers --version 3.0.0-alpha.721
#r "nuget: Trellis.Analyzers, 3.0.0-alpha.721"
#:package Trellis.Analyzers@3.0.0-alpha.721
#addin nuget:?package=Trellis.Analyzers&version=3.0.0-alpha.721&prerelease
#tool nuget:?package=Trellis.Analyzers&version=3.0.0-alpha.721&prerelease
Trellis.Analyzers
Roslyn analyzers that keep Trellis usage safe, idiomatic, and review-friendly.
Requirements
Trellis runtime libraries require .NET SDK 11.0.100 or later. The analyzers remain
netstandard2.0 components compiled against Roslyn 5.9 and need a Roslyn 5.9+ compiler
host. Older hosts report CS9057 and skip the TRLS diagnostics.
Installation
The analyzers are opt-in and ship separately — installing Trellis.Core does not include them.
dotnet add package Trellis.Analyzers
Prevent the package from flowing transitively to consumers of your library (analyzers are a build-time-only concern):
<PackageReference Include="Trellis.Analyzers" Version="...">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Tune any rule's severity per project via .editorconfig, e.g. dotnet_diagnostic.TRLS001.severity = error.
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.Valueaccess 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, andIgnoremappings for Trellis convention-owned properties (TRLS021). - Warns when a fresh GUID-derived value reaches an error/violation reason code or FluentValidation
WithErrorCode, while allowing incident/resource IDs and other dynamic application codes (TRLS067). - Includes fixes for Trellis-specific issues such as
SaveChangesAsyncvs.SaveChangesResultAsync. - See the API reference for the full diagnostic list, including TRLS067 and the bundled generator diagnostics.
Documentation
Part of Trellis
This package is part of the Trellis framework.
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.721 | 111 | 11/15/2026 |
| 3.0.0-alpha.582 | 159 | 10/19/2026 |
| 3.0.0-alpha.574 | 268 | 10/14/2026 |
| 3.0.0-alpha.571 | 94 | 10/13/2026 |
| 3.0.0-alpha.557 | 166 | 10/8/2026 |
| 3.0.0-alpha.554 | 118 | 10/8/2026 |
| 3.0.0-alpha.553 | 80 | 10/7/2026 |
| 3.0.0-alpha.542 | 135 | 10/5/2026 |
| 3.0.0-alpha.539 | 89 | 10/4/2026 |
| 3.0.0-alpha.532 | 131 | 10/2/2026 |
| 3.0.0-alpha.527 | 104 | 10/1/2026 |
| 3.0.0-alpha.526 | 80 | 9/30/2026 |
| 3.0.0-alpha.524 | 84 | 9/27/2026 |
| 3.0.0-alpha.520 | 98 | 9/25/2026 |
| 3.0.0-alpha.516 | 250 | 9/22/2026 |
| 3.0.0-alpha.513 | 90 | 9/22/2026 |
| 3.0.0-alpha.505 | 202 | 9/13/2026 |
| 3.0.0-alpha.495 | 258 | 8/24/2026 |
| 3.0.0-alpha.458 | 190 | 8/19/2026 |
| 3.0.0-alpha.455 | 166 | 8/19/2026 |