Nullable.Extended.Analyzer
1.19.0
dotnet add package Nullable.Extended.Analyzer --version 1.19.0
NuGet\Install-Package Nullable.Extended.Analyzer -Version 1.19.0
<PackageReference Include="Nullable.Extended.Analyzer" Version="1.19.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Nullable.Extended.Analyzer" Version="1.19.0" />
<PackageReference Include="Nullable.Extended.Analyzer"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Nullable.Extended.Analyzer --version 1.19.0
#r "nuget: Nullable.Extended.Analyzer, 1.19.0"
#:package Nullable.Extended.Analyzer@1.19.0
#addin nuget:?package=Nullable.Extended.Analyzer&version=1.19.0
#tool nuget:?package=Nullable.Extended.Analyzer&version=1.19.0
Nullable.Extended.Analyzer
A Roslyn analyzer that warns about every usage of the null-forgiving operator !
that is not justified by a comment, so everyone knows why it is needed. It works in any IDE and on CI.
dotnet add package Nullable.Extended.Analyzer
Justification comments
A justification comment is one or more single line comments directly above the statement or declaration.
The first comment line must start with // ! , followed by the justification text:
// ! This is only needed to demo the feature
var text = value1!.ToString();
A code fix is offered that adds the scaffold for the comment.
Diagnostics
| Id | Context |
|---|---|
| NX0001 | Any other usage of the null-forgiving operator. |
| NX0002 | Null-forgiving operator on the null or default literals at any other statement. |
| NX0003 | Null-forgiving operator inside lambda expressions. |
| NX0004 | Null-forgiving operator on the null or default literals at init only property assignment. |
The severity of each category can be configured in your .editorconfig file:
[*.cs]
dotnet_diagnostic.NX0001.severity = error
dotnet_diagnostic.NX0003.severity = suggestion
More
See the project page for the Visual Studio extension, which also detects operators that are no longer needed, and for an MCP server that helps AI assistants to find and fix unjustified operators in large solutions.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Nullable.Extended.Analyzer:
| Package | Downloads |
|---|---|
|
Chaws.DotNet.CodingStandards
Opinionated .NET coding styles and static analysis settings for my projects. |
GitHub repositories (9)
Showing the top 9 popular GitHub repositories that depend on Nullable.Extended.Analyzer:
| Repository | Stars |
|---|---|
|
netchx/netch
A simple proxy client
|
|
|
Fody/PropertyChanged
Injects INotifyPropertyChanged code into properties at compile time
|
|
|
dotnet/DataGridExtensions
Modular extensions for the WPF DataGrid control
|
|
|
paulirwin/JavaToCSharp
Java to C# converter
|
|
|
tom-englert/Wax
An interactive editor for WiX setup projects.
|
|
|
Altinn/altinn-studio
Next generation open source Altinn platform and applications.
|
|
|
microsoft/vscode-copilotstudio
VS Code Extension for Copilot Studio
|
|
|
appany/Minio.AspNetCore
AspNetCore integration for Minio client
|
|
|
winstxnhdw/lc-hax
A powerful, feature-rich and highly performant internal cheat for the co-op indie horror video game, Lethal Company.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.19.0 | 4,932 | 10/27/2026 |
| 1.18.2 | 2,409 | 10/26/2026 |
| 1.18.1 | 122 | 10/26/2026 |
| 1.18.0 | 1,444 | 10/25/2026 |
| 1.17.1 | 3,467 | 10/22/2026 |
| 1.17.0 | 7,757 | 10/18/2026 |
| 1.16.6891 | 127,521 | 9/2/2026 |
| 1.16.1 | 80 | 10/18/2026 |
| 1.15.6581 | 1,091,360 | 4/30/2025 |
| 1.15.6495 | 132,384 | 12/20/2024 |
| 1.15.6169 | 407,150 | 12/26/2023 |
| 1.14.6129 | 47,833 | 12/6/2023 |
| 1.10.4539 | 261,798 | 8/28/2021 |
| 1.9.4534 | 578 | 8/27/2021 |
| 1.8.4532 | 612 | 8/27/2021 |
| 1.7.4526 | 598 | 8/26/2021 |
| 1.2.4089 | 4,507 | 2/21/2021 |
| 1.0.4033 | 2,709 | 2/4/2021 |
| 1.0.0-beta07 | 543 | 1/19/2021 |
| 1.0.0-beta06 | 548 | 1/16/2021 |