Fantomas
fsprojects.github.io
What it is
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.
Spec sheet
- Purpose
- Fantomas is an opinionated formatter for F# source code that formats files based on configuration.Read 9 Oct 2026 · fsprojects.github.io
- Bug reporting
- The package page directs users to an online bug reporting tool that opens an issue with reproduction details.Read 9 Oct 2026 · nuget.org
- CI checks
- The `dotnet fantomas check` command reports formatting drift and exits with a failure code when files need formatting.Read 9 Oct 2026 · fsprojects.github.io
- Configuration
- A limited set of formatting options can be stored in `.editorconfig` and read automatically by the command line tool.Read 9 Oct 2026 · fsprojects.github.io
- Editor integrations
- The maker provides setup guides for JetBrains Rider, Visual Studio Code, and Visual Studio.Read 9 Oct 2026 · fsprojects.github.io
- Input requirement
- The documentation says source files are assumed to be parsable by the F# compiler before formatting.Read 9 Oct 2026 · fsprojects.github.io
- Install
- Fantomas is installed as a .NET tool, with local installation recommended so a repository can use a fixed version.Read 9 Oct 2026 · fsprojects.github.io
- Library and license
- The library and tool are available under the Apache 2.0 license.Read 9 Oct 2026 · fsprojects.github.io
- Maintainer project
- The official site describes Fantomas as an fsprojects incubation project.Read 9 Oct 2026 · fsprojects.github.io
- Online tool
- The official site links to an online tool for trying Fantomas and its settings.Read 9 Oct 2026 · fsprojects.github.io
- Release
- The GitHub releases page lists version 8.0.7, released October 5, 2026.Read 9 Oct 2026 · github.com
- Style guides
- Its defaults follow Microsoft's F# style guide, with settings available for G-Research conventions.Read 9 Oct 2026 · fsprojects.github.io
- Supported file types
- The command line accepts folders or files ending in `.fs`, `.fsi`, `.fsx`, `.ml`, or `.mli`.Read 9 Oct 2026 · fsprojects.github.io
Plans and prices
Strong points and limits
Strong points
- Defaults follow Microsoft’s F# style guide.
- CI check reports drift with a failure code.
- A limited set of options can be stored in `.editorconfig`.
- Setup guides cover three named editors.
- Free and available under the Apache 2.0 license.
Limits
- Input files are expected to parse with the F# compiler.
- Only a limited set of options is available in `.editorconfig`.
- The command line accepts only the listed file extensions.
Who it suits
Fantomas is for F# developers who want configured formatting in local projects or automated checks. Its editor guides and online tool provide different ways to work with or try the formatter.
Verdict
Fantomas provides configurable F# formatting with editor guidance and a command-line check for automated workflows. Its parsing requirement and limited configuration surface are worth checking against a project’s needs.
Where Specifiction places it
- Code Formatting Tools#9 of 348.0