C# / ROSLYN ANALYZERS

Make intent unmistakable.

Explicit null contracts. Meaningful test failures. Warning suppressions that explain themselves.

Wrangler puts practical guardrails where you write code, without hiding missing data behind fabricated defaults.

From your C# project folder, install the NuGet prerelease:

dotnet add package DotNetWrangler.Analyzers --prerelease

Individually configurable. Intentional exceptions welcome.

Person.csC#

Instead of hiding missing data

public string Name { get; init; } = null!;

WRANGLER0002 Null-forgiving operator fabricates a non-null value

Express the contract

public required string Name { get; init; }
Require meaningful initialization, or make missing data explicit.

Find your starting point

A focused rule set, with the reasoning and the escape hatches documented.

Adopt at your pace

Choose a severity for each rule. Enable the optional pragma policies only when they fit your team.

Configure Wrangler

Understand the diagnostic

See what triggers a rule, compare preferred code, and check framework-specific advice.

Browse the analyzer catalog

Keep exceptions explicit

Valid uses can still trigger a diagnostic. Document the reason with a narrow suppression, not a silent workaround.

Document an exception