Find @BeforeEach methods that reassign val properties
Proprietary@BeforeEach runs before every test, but val property assignment only happens at construction. If setUp looks like value = ... against a val, it doesn't compile — but the related anti-pattern (reassigning a lateinit var per test where the type-safe shape would be a val initialized in the constructor) is worth surfacing.
org. openrewrite. kotlin. testing. FindBeforeEachReinitializingFinal$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. testing. FindBeforeEachReinitializingFinal$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.