Fantomas vs Spotless
Fantomas
fsprojects.github.ioSpotless
github.comSide by side
| Figure | Fantomas | Spotless |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | Yes |
| Open source | — | — |
| Web | Yes | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Plans published | 1 | 2 |
| Spec score · Code Formatting Tools | 8.0 (#9) | 7.3 (#28) |
| Editor integrations | The maker provides setup guides for JetBrains Rider, Visual Studio Code, and Visual Studio. | The README links Spotless integrations for VS Code and IntelliJ. |
| Purpose | Fantomas is an opinionated formatter for F# source code that formats files based on configuration. | Spotless formats source code and can check files for formatting violations or apply fixes. |
Plans
In their own words
Fantomas
Fantomas formats F# source code according to configuration, using default rules based on Microsoft’s F# style guide. Settings are also available for G-Research conventions. It runs as a .NET tool, and local installation is recommended when a repository needs to keep a fixed version. The command line accepts folders or files with `.fs`, `.fsi`, `.fsx`, `.ml` or `.mli` extensions; source files are expected to parse with the F# compiler before formatting. A limited selection of options can be placed in `.editorconfig` for automatic use by the command-line tool. For continuous integration checks, `dotnet fantomas check` reports formatting drift and exits with a failure code when files need formatting. Setup guides are available for JetBrains Rider, Visual Studio Code and Visual Studio, and the official site links to an online tool for trying the formatter and its settings. Fantomas and its library are available under the Apache 2.0 license. The project is described as an fsprojects incubation project. It is free and open source, with web access listed alongside Linux, macOS and Windows.
Spotless
Spotless formats source code and can check files for formatting violations or apply fixes. It supports languages and formats including Java, Kotlin, JavaScript, Python, SQL, YAML, and Markdown, with formatter options such as Google Java Format, ktlint, Prettier, ESLint, Black, and ScalaFmt. The project integrates with Gradle and Maven and links to an external SBT integration. Its README links to VS Code and IntelliJ integrations. Spotless lists automatic idempotency and encoding safeguards for Gradle, Maven, and SBT. Git-based features include ratcheting from a Git reference for Gradle and Maven, and Git-defined line endings for all three build tools. Some capabilities, including ratcheting and fast incremental formatting, are unavailable in SBT. The repository identifies the license as Apache-2.0. Spotless is available for Linux, macOS, and Windows. DiffPlug directs questions to its forum and lists a technical support contact; security disclosures can be sent to [email protected]. Its plan listing includes a free plan at free, billed free forever with no registration required, and also lists a free trial.