Skip to content
SPECIFICTION
Get listed

Ruff vs Scalafmt

Ruff

docs.astral.sh

Scalafmt

scalameta.org

Side by side

FigureRuffScalafmt
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WebYes—
WindowsYesYes
macOSYesYes
LinuxYesYes
Self-hostedYesYes
Plans published11
Spec score · Code Formatting Tools7.9 (#12)7.6 (#22)
ConfigurationRuff supports configuration through pyproject.toml, ruff.toml, or .ruff.toml.Formatting options are set in a plain text .scalafmt.conf file using HOCON syntax.
Editor integrationsThe setup guide documents integrations including VS Code, Sublime Text, PyCharm, and Zed.The documentation describes use with IntelliJ, VS Code, Vim, NeoVim, Emacs, Sublime Text, and Eclipse, with Metals supporting formatting requests from editors.
PurposeRuff is a Python linter and code formatter written in Rust.Scalafmt is a code formatter for Scala that formats code consistently across a team.
SecurityRuff’s rules include a Bandit-derived group for detecting common security issues, including possible vulnerabilities in Python code.The official Scalafmt pages opened for this research do not state security certifications or compliance claims.
SupportThe editor setup documentation says setup instructions are provided on a best-effort basis and directs users to open an issue for assistance.The project site links to a community Discord and GitHub, and the CLI help directs bug reports to GitHub issues.

Plans

Ruff

  • RuffFree

Ruff pricing →

Scalafmt

  • FreeFree

Scalafmt pricing →

In their own words

Ruff

Ruff is a Python linter and code formatter written in Rust, available free under a permissive open-source license. It includes more than 900 built-in lint rules, including native versions of popular Flake8 plugin rules, and can automatically correct violations such as unused imports. Its formatter aims to serve as a replacement for Black, though the documentation allows for differences in some cases. The built-in Ruff Language Server supplies diagnostics, fixes, and formatting; the documentation recommends pairing it with another Python language server for navigation and autocompletion. Setup guidance covers VS Code, Sublime Text, PyCharm, and Zed, while CI support includes GitHub Actions, GitLab CI/CD, and pre-commit hooks. Ruff can be installed through uv, pip, pipx, standalone installers, Homebrew, Conda, and other package managers. It supports configuration in pyproject.toml, ruff.toml, or .ruff.toml. A Bandit-derived rule group checks for common Python security issues. Ruff runs on Linux, macOS, and Windows, and is also published as a Docker image. The maker describes it as 10–100x faster than tools such as Flake8 and Black.

Visit docs.astral.sh

Scalafmt

Scalafmt is a free Scala code formatter for keeping formatting consistent across a team. It handles Scala 2, Scala 3, sbt files and Scala scripts, with one dialect selected for each file. Formatting options are stored in a plain-text .scalafmt.conf file using HOCON syntax. Since version 3.1.0, the configuration must explicitly specify both the version and runner.dialect. Scalafmt can run from an editor, build tool or terminal. Documented editor integrations include IntelliJ, VS Code, Vim, NeoVim, Emacs, Sublime Text and Eclipse; Metals supports formatting requests from editors. It integrates with sbt and documents integrations for Maven, Gradle and Mill. Command-line check and test modes report misformatted code without writing changes. It also supports ignoring files, changed-lines formatting and a library API. IntelliJ range formatting uses IntelliJ’s own formatter by default: Scalafmt is designed primarily for whole files, and selected ranges may produce undesirable results. The project license is Apache-2.0.

Visit scalameta.org