[
https://issues.apache.org/jira/browse/SEDONA-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17697775#comment-17697775
]
Doug Dennis commented on SEDONA-257:
------------------------------------
[~jiayu] I opened an issue to track adding spotless to the build. I like making
spotless run in its auto mode as well. The only extra step is that an
additional build stage has to be created so that the build can fail if a PR
hasn't been formatted.
> Add Spotless to Build
> ---------------------
>
> Key: SEDONA-257
> URL: https://issues.apache.org/jira/browse/SEDONA-257
> Project: Apache Sedona
> Issue Type: Improvement
> Reporter: Doug Dennis
> Priority: Major
>
> Spotless (https://github.com/diffplug/spotless/tree/main/plugin-maven) allows
> for autoformatting Scala code using scalafmt
> (https://scalameta.org/scalafmt/). By adopting this into the build process,
> the current task of cleaning up linter messages will get accelerated and it
> will provide a method of ensuring the formatting stays clean.
> I recommend implementing it in the following way:
> * Adding spotless to the maven build process using automatic fixing (so apply
> not check).
> * Adding a new build stage that runs spotless:check and fails on any issues.
> * Utilize spotless's ratchet feature
> ([link|https://github.com/diffplug/spotless/blob/main/plugin-maven/README.md#how-can-i-enforce-formatting-gradually-aka-ratchet])
> to make it so that the packages/files can get updated gradually.
> The other option to bullet 3 above, is to run apply on everything when adding
> spotless for the first time. This could be a massive diff but it will get it
> over with.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)