Skip to content

ci: check Rust function spacing in the formatting gate - #1063

Merged
LunaStev merged 4 commits into
wavefnd:masterfrom
hiyouwhatsapp:fix/rust-function-spacing-ci-893
Nov 2, 2026
Merged

LunaStev merged 4 commits into
wavefnd:masterfrom
hiyouwhatsapp:fix/rust-function-spacing-ci-893

Conversation

@hiyouwhatsapp

@hiyouwhatsapp hiyouwhatsapp commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #893

The formatting gate only ran cargo fmt, so it could miss blank lines between Rust functions.

It now uses the existing formatter's --check path, which runs rustfmt and checks function spacing without writing files. The 38 missing blank lines in 13 existing Rust files are fixed.

The reported FreeBSD "test1-O2 exit=17" is intentional output from a passing reporting regression. The actual runtime job timed out while waiting for the single-user shell prompt. Its saved guest log shows a kernel device message splitting "pathname" in the prompt. A separate fix recognizes the short prompt prefix and still requires the actual root shell prompt before executing guest cases.

Validation:

  • Formatter and CI unit suites: 73 tests exercised; the one Windows default-encoding failure passes with CI's UTF-8 setting.
  • FreeBSD console and runtime-reporting suites: 19 tests passed, including the interleaved-prompt regression.
  • Function-spacing check passes over every tracked Rust source; the Rust diff contains only blank-line additions.
  • All 50 upstream CI checks pass on commit 21e3218. CI results

Use the existing formatter's --check mode after rustfmt so CI also rejects missing blank lines between functions

Add regression coverage for the CI command, missing spacing and unchanged source files

Signed-off-by: hiyouwhatsapp <[email protected]>
@LunaStev

LunaStev commented Nov 1, 2026

Copy link
Copy Markdown
Member

The implementation looks good overall. Integrating the existing Rust function-spacing checker into the CI formatting gate is the right approach.

However, the current CI has 8 failing jobs.

  1. Seven Build & test jobs fail with Rust function spacing does not match the Wave style. Please identify and fix the formatting violations so the new gate passes.
  2. The FreeBSD amd64 runtime job reports FAIL amd64 test1-O2 exit=17. Please investigate whether this failure is related to the PR or an independent regression.

Please rerun the full CI after addressing these issues.

No changes to the overall implementation approach are requested.

@LunaStev
LunaStev merged commit 1d17514 into wavefnd:master Nov 2, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check the Rust function-spacing policy in CI

2 participants