Doug Dennis created SEDONA-257:
----------------------------------

             Summary: 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


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)

Reply via email to