Closed gdesmott closed 1 year ago
Needs a Github Actions CI check that the formatted code is actually cargo-fmt'ed, otherwise it'll get out of sync again.
I configured my editor (vscode
) to automatically run rustfmt
whenever a file is written, so I don't have to ever bother about this. It's quite handy.
I configured my editor (
vscode
) to automatically runrustfmt
whenever a file is written, so I don't have to ever bother about this. It's quite handy.
That solves the problem for you. I think this doesn't help on a shared project though. I won't be able to verify that a PR is cargo-fmt'ed by looking at it.
I think this doesn't help on a shared project though. I won't be able to verify that a PR is cargo-fmt'ed by looking at it.
Sure, I have a CI job checking formatting in all my projects. I'm more of a Gitlab person, but I think I may have something in system-dep
's CI I could re-use.
Oh you already have some CI, then it's easy. Should be good but I can't run the CI pipeline myself. :\
Looks like rustfmt
is not installed in the nightly image. Should we run it only on stable then?
Looks like
rustfmt
is not installed in the nightly image. Should we run it only on stable then?
That would work, or you could install rustfmt as well: https://github.com/actions-rs/toolchain/tree/88dc2356392166efad76775c878094f4e83ff746#components. Both are fine.
I disabled it as I suppose nightly could require a different format because of changes in rustfmt
.
Fix coding styles.