Find assertions in a try block whose catch swallows the failure

Proprietary

Marks JUnit, TestNG, AssertJ and Hamcrest assertions in a try block whose catch for AssertionError, Error or Throwable discards the failure, so the test passes whatever the assertion found. Not marked: a catch that reads the error, throws, asserts, assigns or returns a value; a try block that goes on after its last assertion, such as to set a success flag; assertions in lambdas and nested classes.

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

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