Apicurio / apicurio-registry

An API/Schema registry - stores APIs and Schemas.
https://www.apicur.io/registry/
Apache License 2.0
558 stars 250 forks source link

Add spotless for automatic formatting #4766

Closed andreaTP closed 2 weeks ago

andreaTP commented 3 weeks ago

Proposal to use an automatic code formatter.

Notes:

apicurio-bot[bot] commented 3 weeks ago

Thank you for creating a pull request!

Pinging @jsenko, @carlesarnal to respond or triage.

EricWittmann commented 3 weeks ago

Note: Waiting on this until after 3.0 Milestone 2 is released.

@andreaTP can you change these two rules:

<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>

Set those to 110 instead of 80?

andreaTP commented 3 weeks ago

@EricWittmann done :+1: I put this on hold until we are ready to merge, as everything will break it. For our future selves:

do 1 commit with the setup. Run:

mvn spotless:appl
mvn spotless:apply -f operator/pom.xml
mvn spotless:apply examples/pom.xml

and you get a "ready to go" PR :slightly_smiling_face: