Head over to the user docs for instructions on how to install scalafmt.
- On Windows add -Dfile.encoding=UTF8 to SBT_OPTS.
- Run formatting tests:
core/testOnly org.scalafmt.FormatTests. - Write new formatting test: read this doc.
- Build docs:
sbt readme/runwill create the docs, which you can open withopen readme/target/scalatex/index.html. Docs are built with Scalatex. - Hack on IntelliJ plugin: see this doc.
- Hack on scalafmt: see tutorial.
- Hack on SBT plugin: run
sbt scripted. - Run jmh benchmarks:
run-benchmarks.sh. - Run formatter on millions of lines of code:
core/test:runMain org.scalafmt.FormatExperimentApp: - Debug performance: after each test run in
FormatTests, a flamegraph report like this one is generated intarget/index.html. I usually keep a browser tab open atlocalhost:3000/target/index.htmlalong with this background process:browser-sync start --server --files "target/*.html". See Browsersync.
If you'd like to find out how to work on scalafmt, see this tutorial.
The current maintainers (people who can merge pull requests) are:
An up-to-date list of contributors is available here: https://github.com/olafurpg/scalafmt/graphs/contributors
We strive to offer a welcoming environment to learn, teach and contribute.
[JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html) generously supports scalafmt with its full-featured Java Profiler.