Use conditional throw expression
ProprietaryDetect if (x == null) throw ... patterns that could use x ?? throw ....
OpenRewrite. Recipes. CSharp. CodeQuality. Simplification. UseConditionalExpressionForThrowmod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Simplification. UseConditionalExpressionForThrowInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.