Code formatter for Scala
Branch: master
Clone or download
olafurpg Merge pull request #1365 from er1c/java11-testcompile
Minor tweak for java11 .lines not getting picked up via StringOps in scala-dynamic testfile DynamicSuite.scala
Latest commit f215433 Feb 6, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add an "original code" section the issue template Dec 14, 2017
bin Remove outdated CI scripts Sep 3, 2018
docs Merge pull request #1355 from dwijnand/patch-5 Feb 1, 2019
project Add release notes for v2.0 Jan 7, 2019
readme Remove unused scalatex sources Dec 30, 2018
scalafmt-benchmarks/src Fix the typos detected by Aug 8, 2018
scalafmt-cli/src/main/scala/org/scalafmt/cli Add scalafmt-dynamic module. Jan 7, 2019
scalafmt-core Further polish Jan 7, 2019
scalafmt-docs/src/main Document scalafmt-dynamic on the website Jan 7, 2019
scalafmt-dynamic/src Minor fix for java11 .lines in scala-dynamic testfile DynamicSuite.scala Feb 6, 2019
scalafmt-intellij-plugin GitHub Jan 31, 2019
scalafmt-intellij Cleanning up Apr 15, 2018
scalafmt-interfaces/src/main/java/org/scalafmt/interfaces Report range positions for parse errors Jan 7, 2019
scalafmt-tests/src Add scalafmt-dynamic module. Jan 7, 2019
website Add release notes for v2.0 Jan 7, 2019
.drone.yml Add more details to 0.7 changelog Apr 23, 2017
.drone.yml.sig Add more details to 0.7 changelog Apr 23, 2017
.gitignore Fill out rewrite rule section Aug 13, 2018
.jvmopts Fix JVM options Aug 24, 2018
.sbtopts Add Java 6 compatibility, fixes #112. Mar 9, 2016
.scalafmt.conf Document scalafmt-dynamic on the website Jan 7, 2019
.travis.yml add JDK 11 to Travis-CI matrix Oct 24, 2018 Move CONTRIBUTING guide to the website May 27, 2018 Apache licence Mar 3, 2016
appveyor.yml Stick appveyor sbt version to 0.13 Aug 11, 2017
build.sbt Fix installation instructions so they work with the new organization Jan 8, 2019 Welcome Rikito Taniguchi to the team! Feb 6, 2019
sbt Put sbt back in root Mar 16, 2017
scalafmt Update binary Apr 26, 2018
scalafmt.ps1 fix for jvmopts and enabling no-stderr by default if possible (#987) Jul 1, 2017


Build Status Build status Join the chat at Latest version

User documentation

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

Quick help

  • sbt compile on a clean machine will fail to compile the scalafmt-intellij project.
    • if you plan to develop the intellij plugin, run downloadIdea first to fetch the IntelliJ SDK (~600mb).
    • or, run sbt test 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/
  • Hack on IntelliJ plugin: see this doc.
  • Hack on sbt plugin: run sbt scripted.
  • Run jmh benchmarks: ./bin/
  • 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.
  • intellij/compile:compileIncremental failed? Run downloadIdea to download custom IntelliJ plugin. The download may take a while.


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

An up-to-date list of contributors is available here:

We strive to offer a welcoming environment to learn, teach and contribute.


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