Add scalafmt (plugin) to scala-http4s client generator

Merged
DE
7mo ago
+122-0

Summary

  • Adds scalafmt.conf and sbt-scalafmt plugin to the scala-http4s client generator for consistent code formatting
  • Uses runner.dialect = scala3 to match the generator's Scala 3.6.4 target
  • Follows the pattern established in #23273 for scala-sttp4

Refs #23274

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/scala-http4s.yaml || exit
    
    Commit all changed files.
  • File the PR against the correct branch: master
  • If your PR solves a reported issue, reference it using GitHub's linking syntax
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Summary by cubic

Add Scalafmt support to the scala-http4s client generator for consistent formatting of generated Scala 3 code. Generates the plugin and config so users can run formatting out of the box.

  • New Features
    • Generate .scalafmt.conf and project/plugins.sbt for scala-http4s clients.
    • Include sbt-scalafmt plugin 2.5.6 and Scalafmt version=3.10.6 with runner.dialect = scala3 (matches Scala 3.6.4 target).
    • Only added when SBT files are generated (skipped if excludeSbt is true).