openrewrite / rewrite-gradle-plugin

OpenRewrite's Gradle plugin.
Apache License 2.0
60 stars 37 forks source link

Reduce verbosity of the default output #242

Open vlsi opened 10 months ago

vlsi commented 10 months ago

What problem are you trying to solve?

Regular build logs should indicate only important issues

Describe the solution you'd like

By default, rewriteRun should be silent in case it makes no modifications.

Currently rewrite-gradle-plugin produces

> Task :benchmarks:rewriteRun
Validating active recipes
Scanning sources in project :benchmarks
Using active styles [io.github.pgjdbc.style.Style, org.openrewrite.java.Checkstyle]
All sources parsed, running active recipes: org.openrewrite.java.OrderImports, org.openrewrite.staticanalysis.MissingOverrideAnnotation

> Task :pgjdbc-osgi-test:rewriteRun
Validating active recipes
Scanning sources in project :pgjdbc-osgi-test
Using active styles [io.github.pgjdbc.style.Style, org.openrewrite.java.Checkstyle]
All sources parsed, running active recipes: org.openrewrite.java.OrderImports, org.openrewrite.staticanalysis.MissingOverrideAnnotation

> Task :postgresql:rewriteRun
Validating active recipes
Scanning sources in project :postgresql
Using active styles [io.github.pgjdbc.style.Style, org.openrewrite.java.Checkstyle]

I believe the messages do not belong to lifecycle level. They should probably be moved to info, so they should be visible only in case the user provides --info.

Validating active, Scanning sources, and All sources parsed, running active recipes probably belong to debug level.

Have you considered any alternatives or workarounds?

Frankly speaking, no.

Additional context

I'm adding OpenRewrite to pgjdbc/pgjdbc.

Are you interested in contributing this feature to OpenRewrite?

Maybe.