Add comment before property key

Apache 2.0

Add a new comment before a property key if not already present, optionally commenting out the property.

org.openrewrite.properties.AddPropertyComment

Required

The name of the property to add comment.

The comment to be added.

Optional

commentOutPropertyBoolean

If true, property will be commented out.

mod run . --recipe=org.openrewrite.properties.AddPropertyComment \ -P propertyKey=management.metrics.binders \ -P comment=comment

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