Head over to the user docs for instructions on how to install scalafmt.
sbt compileon a clean machine will fail to compile thescalafmt-intellijproject.- if you plan to develop the intellij plugin, run
downloadIdeafirst to fetch the IntelliJ SDK (~600mb). - or, run
sbt testorsbt core/compile(specific project).
- if you plan to develop the intellij plugin, run
- Run all unit tests:
sbt test - Run only formatting tests:
tests/testOnly *FormatTests. - Write new formatting test: read this doc.
- Build docs: See instructions on the site or locally at
./docs/contributing-website.md. - Hack on IntelliJ plugin: see this doc.
- Hack on sbt plugin: run
sbt scripted. - Run jmh benchmarks:
./bin/run-benchmarks.sh. - Run formatter on millions of lines of code:
tests/test:runMain org.scalafmt.ScalafmtProps(slow, and requires a lot of memory/cpu) - 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. intellij/compile:compileIncrementalfailed? RundownloadIdeato download custom IntelliJ plugin. The download may take a while.
The current maintainers (people who can merge pull requests) are:
- Ólafur Páll Geirsson -
@olafurpg - Pedro J Rodriguez Tavarez -
@pjrt - Iurii Susuk -
@ysusuk - Paul Draper -
@pauldraper - Rikito Taniguchi
@tanishiking
An up-to-date list of contributors is available here: https://github.com/scalameta/scalafmt/graphs/contributors
We strive to offer a welcoming environment to learn, teach and contribute.
JProfiler generously supports scalafmt with its full-featured Java Profiler.