Migrate RuntimeOptionsBuilder

MSAL

Cucumber-JVM 7.0.0 dropped RuntimeOptionsBuilder.addDefaultFormatterIfAbsent(), as no formatter is added implicitly any more, and renamed addDefaultSummaryPrinterIfAbsent() to addDefaultSummaryPrinterIfNotDisabled(), which defers to the new setNoSummary(). Mirrors the change Cucumber-JVM made to its own io.cucumber.core.cli.Main, which projects that run Cucumber programmatically tend to have copied.

org.openrewrite.cucumber.jvm.MigrateRuntimeOptionsBuilder
mod run . --recipe=org.openrewrite.cucumber.jvm.MigrateRuntimeOptionsBuilder

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

Recipe list

It runs these recipes, in this order.

  1. Remove method invocations io.cucumber.core.options.RuntimeOptionsBuilder addDefaultFormatterIfAbsent()
  2. Change method name io.cucumber.core.options.RuntimeOptionsBuilder addDefaultSummaryPrinterIfAbsent() to addDefaultSummaryPrinterIfNotDisabled