Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-257

Add Spotless to Build

    XMLWordPrintableJSON

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

          Activity

            People

              Unassigned Unassigned
              dougdennis Doug Dennis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: