Properly use declaration-site type variance for well-known types

MSAL

When using a method parameter like Function<IN, OUT>, it should rather be Function<? super IN, ? extends OUT>. This recipe checks for method parameters of well-known types.

org.openrewrite.staticanalysis.CommonDeclarationSiteTypeVariances
mod run . --recipe=org.openrewrite.staticanalysis.CommonDeclarationSiteTypeVariances

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

Recipe list

It runs these recipes, in this order.

  1. Properly use declaration-site type variance