Find methods that could be static
Recipe ID
OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindMakeMethodStaticArtifactOpenRewrite.Recipes.CSharp.CodeQualityDetect private methods that don't appear to use instance members and could be marked static for clarity and performance.
Single recipecsharpperformancecode-qualityProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindMakeMethodStaticIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality