rustfmt vs stylish-haskell
rustfmt
rust-lang.github.iostylish-haskell
github.comSide by side
| Figure | rustfmt | stylish-haskell |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | Yes |
| macOS | Yes | — |
| Linux | Yes | Yes |
| Plans published | 1 | 0 |
| Spec score · Code Formatting Tools | 8.0 (#10) | 6.8 (#30) |
| CI | The README describes using `cargo fmt --all -- --check` to fail a CI build when code is not formatted. | The README describes downloading the latest binary and running stylish-haskell in continuous integration. |
| Configuration | Configuration can be set in `rustfmt.toml` or `.rustfmt.toml`, and the default style conforms to the Rust style guide. | Formatting is customizable through YAML configuration files, with settings available at directory, project, user, or default level. |
| Editor integrations | The README lists integrations or usage instructions for Vim, Emacs, Sublime Text 3, Atom, Visual Studio Code, and IntelliJ or CLion. | The README documents integration with Haskell Language Server, Vim, Emacs, Atom, and Visual Studio Code. |
| Install | The README installs rustfmt as a component through rustup. | The project documents installation with Stack, Cabal, Debian or Ubuntu packages, and Arch Linux packages. |
| License | rustfmt is distributed under both the MIT License and Apache License 2.0. | Hackage lists the package under the BSD-3-Clause license. |
| Purpose | rustfmt formats Rust code according to style guidelines. | stylish-haskell is a Haskell code prettifier designed to help with formatting tasks such as cleaning up import statements. |
| Support | The README points users to `rustfmt --help` and `cargo fmt --help` for command usage and arguments. | The project welcomes feature requests through its GitHub issue tracker. |
Plans
In their own words
rustfmt
rustfmt formats Rust code according to style guidelines. It can format files directly or read code from standard input and write formatted output to standard output. With Cargo, `cargo fmt` formats binary and library targets in a crate and works with workspaces. A `rustfmt.toml` or `.rustfmt.toml` file can hold configuration, including stable and nightly-only options. For automated checks, `--check` returns code 0 when no formatting changes are needed and code 1 when changes would be made; it can be used in CI to fail a build on formatting differences. The README lists editor use with Vim, Emacs, Sublime Text 3, Atom, Visual Studio Code, IntelliJ, and CLion. Rustfmt is available on Windows, macOS, and Linux, and is distributed under the MIT License and Apache License 2.0. It does not attempt to format comments, and listed limitations also involve macros, unparsable code, fragments, and non-ASCII Unicode. Unstable settings require opt-in on nightly, and the README says the latest version requires the nightly toolchain.
stylish-haskell
stylish-haskell has no write-up on Specifiction yet; its figures are above.