Find ignored results of @CheckReturnValue methods
MSALMarks invocations whose result is discarded even though the method is annotated with @CheckReturnValue, either directly or through its enclosing class or package. Any annotation named CheckReturnValue is recognized, and @CanIgnoreReturnValue opts a method or class back out. Ignoring such a result is usually a bug, such as calling a method on an immutable object without using the returned copy. Calls expected to throw, Mockito stubbing and verification, calls on the current instance in custom AssertJ assertion constructors, and code under @SuppressWarnings("CheckReturnValue") are not marked.
org. openrewrite. staticanalysis. FindIgnoredCheckReturnValueOptional
Packages whose methods should be treated as annotated with @CheckReturnValue. Package annotations of dependencies are not part of type attribution, so list packages here that declare @CheckReturnValue in a package-info.java outside of the repository. Subpackages are not included. Separate values with commas.
mod run . --recipe= org. openrewrite. staticanalysis. FindIgnoredCheckReturnValueInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.