indexOf should not compare greater than zero

MSAL

Replaces String#indexOf(String) > 0 and List#indexOf(Object) > 0 with >=1. Checking indexOf against >0 ignores the first element, whereas >-1 is inclusive of the first element. For clarity, >=1 is used, because >0 and >=1 are semantically equal. Using >0 may appear to be a mistake with the intent of including all elements. If the intent is to check whether a value in included in a String or List, the String#contains(String) or List#contains(Object) methods may be better options altogether.

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

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