scalafmt

Code formatter for Scala

  • Owner: scalameta/scalafmt
  • Platform:
  • License:: Apache License 2.0
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

scalafmt

Build Status
Build status
Join the chat at https://gitter.im/scalameta/scalafmt
Join the discord chat
Latest version

User documentation

Head over to the user docs for instructions on how to install scalafmt.

Quick help

  • sbt compile or sbt 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 in target/index.html.
    I usually keep a browser tab open at localhost:3000/target/index.html
    along with this background process:
    browser-sync start --server --files "target/*.html".
    See Browsersync.

Team

The current maintainers (people who can merge pull requests) are:

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

JProfiler generously supports scalafmt with its full-featured Java Profiler.

Main metrics

Overview
Name With Ownerscalameta/scalafmt
Primary LanguageScala
Program languageScala (Language Count: 9)
Platform
License:Apache License 2.0
所有者活动
Created At2015-11-02 21:34:40
Pushed At2025-07-04 04:09:59
Last Commit At
Release Count210
Last Release Namev3.9.8 (Posted on )
First Release Namev0.1.0-RC0 (Posted on 2016-03-03 18:57:17)
用户参与
Stargazers Count1.5k
Watchers Count31
Fork Count285
Commits Count6.6k
Has Issues Enabled
Issues Count1544
Issue Open Count9
Pull Requests Count3140
Pull Requests Open Count6
Pull Requests Close Count183
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private