Find generic wildcard types in return types

Proprietary

Marks a wildcard, such as ?, ? extends T or ? super T, among the type arguments of the return type of a method that is neither private nor an override. Callers then have to deal with the wildcard themselves. As in SonarQube, only the return type's own type arguments are checked, not those nested inside them, Class<?> is allowed, and so is the accumulator type of a Collector. A method annotated @Override, or an instance method whose supertypes are not all known, is skipped. Choosing a concrete type is left to the author. Test sources are not searched.

io.moderne.staticanalysis.FindWildcardReturnType
mod run . --recipe=io.moderne.staticanalysis.FindWildcardReturnType

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