indexOf() replaceable by contains()

MSAL

Checking if a value is included in a String or List using indexOf(value)>-1 or indexOf(value)>=0 can be replaced with contains(value). Using contains() expresses the intent more directly and avoids the mental overhead of interpreting index comparisons.

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

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