Find [DefaultParameterValue] without [Optional]

Proprietary

Detect parameters with [DefaultParameterValue] that are missing [Optional]. Both attributes are needed for COM interop default parameter behavior.

OpenRewrite.Recipes.CSharp.CodeQuality.Style.FindDefaultParameterValueNeedsOptional
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Style.FindDefaultParameterValueNeedsOptional

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