Find @Autowired lateinit var field injection
ProprietaryField injection through @Autowired lateinit var hides the dependency from the constructor, makes the class harder to test (no compile-time guarantee the field is wired), and breaks immutability. Move the dependency into the primary constructor.
org. openrewrite. kotlin. spring. FindAutowiredOnField$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. spring. FindAutowiredOnField$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.