Rustly.Analyzers 10.6.4

dotnet add package Rustly.Analyzers --version 10.6.4
                    
NuGet\Install-Package Rustly.Analyzers -Version 10.6.4
                    
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="Rustly.Analyzers" Version="10.6.4">
  <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="Rustly.Analyzers" Version="10.6.4" />
                    
Directory.Packages.props
<PackageReference Include="Rustly.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 Rustly.Analyzers --version 10.6.4
                    
#r "nuget: Rustly.Analyzers, 10.6.4"
                    
#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 Rustly.Analyzers@10.6.4
                    
#: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=Rustly.Analyzers&version=10.6.4
                    
Install as a Cake Addin
#tool nuget:?package=Rustly.Analyzers&version=10.6.4
                    
Install as a Cake Tool

Rustly.Analyzers (v10.6.4)

Roslyn analyzers enforcing Rust-style patterns: null-safety, explicit error handling, unsafe Unwrap detection. 15 diagnostics (RUSTLY001-015).

Part of the Rustly ecosystem for .NET.

Install

dotnet add package Rustly.Analyzers --version 10.6.4

Diagnostics

ID Description Severity
RUSTLY001 Nullable return should be Option<T> Warning
RUSTLY002 Null check — use Option<T>.Match() Info
RUSTLY003 Try/catch — use Result<T, E> Info
RUSTLY004 Unsafe Unwrap()/Expect() without prior check Error
RUSTLY005 Result<T, E> return value not handled Warning
RUSTLY006 Option<T?> is redundant Warning
RUSTLY007 Use IsNone/IsOk instead of default comparison Info
RUSTLY008 Some(null) is likely a mistake Warning
RUSTLY009 Match() side-effects — use Inspect() Info
RUSTLY010 [EnumValue] missing on some members Warning
RUSTLY011 Map().UnwrapOr() — use MapOr() Info
RUSTLY012 Redundant Unwrap on known-safe value Warning
RUSTLY013 Nullable type forbidden — use Option<T> Warning¹
RUSTLY014 Null assignment forbidden — use Option<T>.None Warning
RUSTLY015 Discard suppression forbidden (_ = field;) Warning

¹ RUSTLY013 is enabled by default at Warning. To make every ? a hard error, set the rustly_only_optionen flag in your .editorconfig:

[*.cs]
rustly_only_optionen = true

When the flag is true, every T? annotation outside Option<T?> (already covered by RUSTLY006) is reported as an Error. You can alternatively configure severity directly with dotnet_diagnostic.RUSTLY013.severity = error.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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
10.6.4 114 4/28/2026
10.6.3 113 4/16/2026
10.6.2 101 4/16/2026
10.6.2-rc6 102 4/16/2026
10.6.2-rc5 120 4/15/2026 10.6.2-rc5 is deprecated because it is no longer maintained and has critical bugs.
10.6.1 104 4/15/2026

EN: 10.6.4
- New: RUSTLY013 — nullable type forbidden, use Option<T> (escalates to Error when rustly_only_optionen=true)
- New: RUSTLY014 — null assignment forbidden, use Option<T>.None
- New: RUSTLY015 — discard suppression `_ = field;` forbidden when RHS has no invocation

RU: 10.6.4
- Новое: RUSTLY013 — запрет nullable-типов, используйте Option<T> (эскалация до Error при rustly_only_optionen=true)
- Новое: RUSTLY014 — запрет присваивания null, используйте Option<T>.None
- Новое: RUSTLY015 — запрет «глушения» вида `_ = field;` без вызова в правой части