rustfmt is an unpleasant obstacle to contributing
Merge request !196 (merged) fails because of rustfmt --check
. There are several problems with such use of rustfmt:
-
unlike gofmt which only corrects a few obviously wrong cases, and leaves the rest the way author has written, rustfmt is a bulldozer that overrides everything everywhere according to its own heuristics, with no input from the code author. To me this forces lots of suboptimal formatting that can't be improved.
-
--check
causes a CI failure and forces PR author to manually run rustfmt, and push again. Given that rustfmt is fully automatic, it shouldn't need a human involved. Uniform formatting could be better enforced by a bot. -
This project seems to depend on a nightly version of rustfmt, so running
cargo fmt
on stable produces significantly different code than what the CI demands - over 20 existing files change. To make things worse, rustfmt build is flaky, so nightlies often don't have it ("component 'rustfmt' for target 'x86_64-apple-darwin' is unavailable for download")