← All recipes
Moderne licensed

Exception name should end with 'Exception'

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Naming.FindExceptionNameShouldEndWithExceptionArtifactOpenRewrite.Recipes.CSharp.CodeQuality

Classes that inherit from System.Exception should have names ending with 'Exception' by convention.

Single recipecsharpnamingcode-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.Naming.FindExceptionNameShouldEndWithException

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

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