Open alice-i-cecile opened 9 months ago
The issue here lies in that benches are not checked by cargo fmt --all -- --check
. I've found two ways to solve it:
cmd!(sh, "cargo fmt --all --manifest-path ../../../benches/Cargo.toml -- --check")
. While not best, it seems to be the only solution I've found if we don't want to add benches to workspace.I think we should start with solution 2 for now.
As you said, the issue is that benches (and compile fail crates) are excluded from the workspace: https://github.com/bevyengine/bevy/blob/4221f7e7e9ae5b2d664a067f1fbabc97a5806232/Cargo.toml#L15-L21
I don't remember why, but if we want the benches to be checked in CI (format, clippy, ...) they should be in the workspace.
Additionally, from the Bevy side, this should be checked by CI.
Originally posted by @rlidwka in https://github.com/bevyengine/bevy/pull/10758#pullrequestreview-1749866027