Find GetCustomAttributes that could use Attribute.IsDefined

Proprietary

Detect GetCustomAttributes().Any() or similar patterns where Attribute.IsDefined would be more efficient.

OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindUseAttributeIsDefined
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindUseAttributeIsDefined

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