← All recipes
Moderne licensed

Find integer 0 used instead of named enum value

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Style.FindUseExplicitEnumValueArtifactOpenRewrite.Recipes.CSharp.CodeQuality

Detect usage of integer literal 0 where a named enum member should be used for clarity.

Single recipecsharpstylecode-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.Style.FindUseExplicitEnumValue

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality