Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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) 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.
Attachments
Issue Links
- is duplicated by
-
SEDONA-616 Apply spotless to snowflake module
- Resolved