Skip to content

Enable Spotless for Scala (scalafmt 3.8.3) - #300

Merged
em3s merged 1 commit into
mainfrom
feature/spotless-scala
May 6, 2026
Merged

em3s merged 1 commit into
mainfrom
feature/spotless-scala

Conversation

@em3s

@em3s em3s commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Activate the previously-disabled Scala block in Spotless so .scala sources get the same formatting guarantees as Java and Kotlin. This prepares the ground for #299 (Add Spark-based pipeline module) so its Scala files can land already on the formatting baseline.

Closes #

Changes

  • BaseConventionsPlugin: enable the scala { ... } block with scalafmt 3.8.3. 3.7.17 hits an InvocationTargetException under spotless 7.0.x on Java 17.
  • GenerateCodeStyleTask: bump scalafmt version to 3.8.3 and drop rewrite.imports.* rules that 3.8.3 rejects; keep align.preset = more and maxColumn = 120.
  • Add scalafmt.conf alongside the committed .editorconfig.

How to Test

  • ./gradlew generateCodeStyle regenerates .editorconfig and scalafmt.conf.
  • ./gradlew :<module>:spotlessApply formats .scala sources on the new baseline.
  • Modules without .scala sources are unaffected — no-op for the current main.

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Code (Opus 4.7)

- BaseConventionsPlugin: turn on the previously-commented Scala block
  with scalafmt 3.8.3 (3.7.17 hits an InvocationTargetException with
  spotless 7.0.x on Java 17).
- GenerateCodeStyleTask: bump scalafmt version to match and trim the
  rewrite.imports rules that 3.8.3 rejects; keep align.preset = more
  and maxColumn = 120 as the baseline.
- Add the generated scalafmt.conf alongside the committed .editorconfig.

Modules without .scala sources are unaffected. Apply spotlessApply per
module to bring existing Scala code onto the baseline.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. maintenance Maintenance work. labels May 6, 2026
@em3s
em3s merged commit 82dbe27 into main May 6, 2026
3 checks passed
@em3s
em3s deleted the feature/spotless-scala branch May 6, 2026 04:13
em3s added a commit that referenced this pull request May 6, 2026
Now that #300 enabled the Spotless Scala step on main, run
spotlessApply across the pipeline module so its sources land on the
shared baseline.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@em3s em3s mentioned this pull request May 6, 2026
1 task done
@em3s em3s self-assigned this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance work. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant