FLTFY16: DisallowNull is redundant for non-nullable properties
June 17, 2026 ยท View on GitHub
| Type Name | FLTFY16_NullabilityAttributeAnalyzer |
| CheckId | FLTFY16 |
| Category | Usage |
Cause
A non-nullable property on a type annotated with Fluentify is also annotated with DisallowNull.
Rule Description
Generated Fluentify extensions already reject null assignments for non-nullable properties. Applying DisallowNull to a non-nullable property is redundant for Fluentify null-assignment behavior.
How to Fix Violations
Remove the redundant DisallowNull attribute.
Example
using System.Diagnostics.CodeAnalysis;
using Fluentify;
[Fluentify]
public sealed class Actor
{
[DisallowNull]
public string Name { get; init; }
}
Use the non-nullable annotation without DisallowNull.
using Fluentify;
[Fluentify]
public sealed class Actor
{
public string Name { get; init; }
}
How to Suppress Violations
#pragma warning disable FLTFY16 // DisallowNull is redundant for non-nullable properties
How to Disable FLTFY16
dotnet_diagnostic.FLTFY16.severity = none