Consolidate lombok.config files
MSALMerge the directives of every nested lombok.config into the root lombok.config and delete the nested files, so that a project has a single place where Lombok is configured. A root lombok.config is created when the project has none. Directives are appended to the root file; what it already declares, itself or through an import, is left as written and not repeated. Note that hoisting a directive widens its scope from the directory that declared it to the whole project, so a directive only some directories can satisfy, such as lombok.val.flagUsage = error, will start to apply to all of them. A nested file is left in place when moving its directives would change what Lombok does: when it declares config.stopBubbling, import, clear or -=, when a lombok.config between it and the root would outrank the root once the directive moved there, when another lombok.config imports it, or when no Java source sits at or below it. No changes are made at all when two files assign conflicting values to the same key, or when the root imports a file that is not among the sources.
org. openrewrite. java. migrate. lombok. ConsolidateLombokConfigmod run . --recipe= org. openrewrite. java. migrate. lombok. ConsolidateLombokConfigInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.