#Is there something to pre-commit format?
2 messages · Page 1 of 1 (latest)
I'm not aware of an easy way to do that though I suspect is it possible. The more common practice is to check that the code is already formatted (avoids having the CI modify the code, which complicates things). Some documentation in this is here: https://github.com/rust-lang/rustfmt#checking-style-on-a-ci-server . I often use format on save in my editor which prevents me from hitting such errors without extra work on my side.