Scalafmt
Code formatter for Scala
Install / Use
/learn @scalameta/ScalafmtREADME
scalafmt
User documentation
Head over to the user docs for instructions on how to install scalafmt.
Quick help
sbt compileorsbt core/compile(specific project).- 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 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.
Team
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 - Mikhail Chugunkov
@poslegm
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.
Acknowledgements
<a href="http://www.ej-technologies.com/products/jprofiler/overview.html"> <img src="https://www.ej-technologies.com/images/product_banners/jprofiler_large.png" align="right" /> </a>JProfiler generously supports scalafmt with its full-featured Java Profiler.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
