Closed eira-fransham closed 6 years ago
@nrc Sorry, I really hate coding without automatic formatting and I try to git add --patch
only the bits that changed but sometimes I mess it up. If you want to enforce that things are always formatted (which is great for reducing git noise in general) you can make cargo fmt
fail CI using cargo fmt -- --check
and if you want to format JS there's a fantastic JS formatter called prettier. We use cargo fmt -- --check
at Parity for our rustfmt
'd projects and the projects that are still unformatted (because of political disagreements) are noticeably harder to review/work on
I plan to put rustfmt on CI for all my projects, but only once it gets to 1.0 - the formatting is still changing a little bit, so it's a bit annoying (as you probably know :-) ). Glad to hear you're a Rustfmt fan!
Thanks for the changes!
This also allows switching to show the source file when possible. This work could easily be extended to support other renderable file types like HTML, XML, RSS etc.