FLTFY14: AllowNull is redundant for nullable properties

June 17, 2026 ยท View on GitHub

Type Name FLTFY14_NullabilityAttributeAnalyzer
CheckId FLTFY14
Category Usage

Cause

A nullable property on a type annotated with Fluentify is also annotated with AllowNull.

Rule Description

Generated Fluentify extensions already allow null to be assigned to nullable properties. Applying AllowNull to a nullable property is redundant for Fluentify null-assignment behavior.

How to Fix Violations

Remove the redundant AllowNull attribute.

Example

using System.Diagnostics.CodeAnalysis;
using Fluentify;

[Fluentify]
public sealed class Actor
{
    [AllowNull]
    public string? Name { get; init; }
}

Use the nullable annotation without AllowNull.

using Fluentify;

[Fluentify]
public sealed class Actor
{
    public string? Name { get; init; }
}

How to Suppress Violations

#pragma warning disable FLTFY14 // AllowNull is redundant for nullable properties

How to Disable FLTFY14

dotnet_diagnostic.FLTFY14.severity = none