CI: check the formatting with cargo fmt on all PRs #17

Closed
raffclar wants to merge 1 commit from upstream-pr/17 into main
raffclar commented 2026-11-23 23:10:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by raffclar on 2026-11-23T23:10:38Z.


Enforce common standard for code styling

<!-- greyfinch-sync:Marvisak/VIctory:issue:6570745849 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/17). Originally posted by [raffclar](https://github.com/raffclar) on 2026-11-23T23:10:38Z. --- Enforce common standard for code styling
PolpOnline commented 2026-11-24 06:54:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by PolpOnline on 2026-11-23T23:12:11Z.


@raffclar Should also enforce tests on CI (at least those not depending on the binary being present)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7116671627 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/17#issuecomment-7116671627). Originally posted by [PolpOnline](https://github.com/PolpOnline) on 2026-11-23T23:12:11Z. --- @raffclar Should also enforce tests on CI (at least those not depending on the binary being present)
raffclar commented 2026-11-24 06:54:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by raffclar on 2026-11-23T23:13:58Z.


Yeah I agree. I'm trying to do things in small chunks for easier review

<!-- greyfinch-sync:Marvisak/VIctory:comment:7116713068 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/17#issuecomment-7116713068). Originally posted by [raffclar](https://github.com/raffclar) on 2026-11-23T23:13:58Z. --- Yeah I agree. I'm trying to do things in small chunks for easier review
DaviTostes commented 2026-11-24 06:54:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T00:06:30Z.


Checked the gate this workflow adds, at main 97c78d1 with the pinned toolchain (rustfmt 1.98.1): the tree is not formatted yet, so the check fails before any PR is looked at.

  • cargo fmt --all -- --check: 141 hunks in 28 files, e.g. crates/victory-formats/src/texture.rs (10), xma.rs (9), xma/tables.rs (16), victory-gpu/src/host.rs (15), victory-hle/src/modules/xgamesave.rs (13), victory-loader/src/crash.rs (7).
  • With #39 stacked the same 141 hunks appear (that PR does not touch formatting).
  • So as written the workflow is red for every PR until the tree is formatted once; either cargo fmt --all should be part of this PR (before the gate is enabled) or the check should compare only the files a PR changes. Also worth pinning the rustfmt version to the rust-toolchain.toml one explicitly, since formatting differs between releases.

No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7117710275 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/17#issuecomment-7117710275). Originally posted by [DaviTostes](https://github.com/DaviTostes) on 2026-11-24T00:06:30Z. --- Checked the gate this workflow adds, at `main` `97c78d1` with the pinned toolchain (rustfmt 1.98.1): **the tree is not formatted yet**, so the check fails before any PR is looked at. - `cargo fmt --all -- --check`: **141 hunks in 28 files**, e.g. `crates/victory-formats/src/texture.rs` (10), `xma.rs` (9), `xma/tables.rs` (16), `victory-gpu/src/host.rs` (15), `victory-hle/src/modules/xgamesave.rs` (13), `victory-loader/src/crash.rs` (7). - With **#39** stacked the same 141 hunks appear (that PR does not touch formatting). - So as written the workflow is red for every PR until the tree is formatted once; either `cargo fmt --all` should be part of this PR (before the gate is enabled) or the check should compare only the files a PR changes. Also worth pinning the rustfmt version to the `rust-toolchain.toml` one explicitly, since formatting differs between releases. No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).
Quat3rnion commented 2026-11-24 06:54:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Quat3rnion on 2026-11-24T00:37:56Z.


The format gate here is red on current main: the tree has about 141 formatting hunks across 28 files. #112 formats the tree once and adds a Linux CI job that runs the format check, workspace tests and asset policy. Please consider closing this in favour of #112. Thanks for starting the CI work, @raffclar.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7118270566 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/17#issuecomment-7118270566). Originally posted by [Quat3rnion](https://github.com/Quat3rnion) on 2026-11-24T00:37:56Z. --- The format gate here is red on current main: the tree has about 141 formatting hunks across 28 files. #112 formats the tree once and adds a Linux CI job that runs the format check, workspace tests and asset policy. Please consider closing this in favour of #112. Thanks for starting the CI work, @raffclar.
upstream-sync closed this pull request 2026-11-24 20:01:30 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!17
No description provided.