Use conditional throw expression

Proprietary

Detect if (x == null) throw ... patterns that could use x ?? throw ....

OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.UseConditionalExpressionForThrow
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.UseConditionalExpressionForThrow

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.