Repository navigation
ci: add multi-language formatting checks - #440
Merged
Merged
Conversation
agicy
force-pushed
the
luanlai/ci-fmt
branch
4 times, most recently
from
November 21, 2026 03:31
0008aaa to
bfa676f
Compare
li041
reviewed
Nov 23, 2026
li041
left a comment
Contributor
There was a problem hiding this comment.
Two small robustness fixes for the Format workflow (clang-format version pin, rustfmt board coverage).
agicy
force-pushed
the
luanlai/ci-fmt
branch
from
November 23, 2026 05:00
bfa676f to
f10c539
Compare
agicy
force-pushed
the
luanlai/ci-fmt
branch
from
November 23, 2026 05:48
f10c539 to
10879b4
Compare
agicy
force-pushed
the
luanlai/ci-fmt
branch
2 times, most recently
from
November 23, 2026 08:19
7c8776f to
9c5f3d4
Compare
agicy
force-pushed
the
luanlai/ci-fmt
branch
from
November 23, 2026 11:47
9c5f3d4 to
5888ba5
Compare
Format tracked YAML files first and add a YAML format check to the new Format workflow.
Add rustfmt to the Format workflow and remove the obsolete make fmt-test call from CI.
Add clang-format to the Format workflow using the existing hvisor-tool style.
Normalize tracked JSON files to four-space indentation and check JSON in the Format workflow.
Normalize tracked TOML files to four-space indentation, add taplo.toml, and check TOML in the Format workflow.
Format tracked Python files with Ruff and check Python in the Format workflow.
agicy
force-pushed
the
luanlai/ci-fmt
branch
from
November 23, 2026 11:58
5888ba5 to
2f02787
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a dedicated format workflow for Rust, C, Python, TOML, JSON, and YAML, and apply the formatters to the existing tree.
The Rust checks cover cargo fmt plus direct rustfmt for
build.rs,platform/*/*/board.rs, andhvisor-tool/examples/**/*.rs. The old__board.rssymlink workaround is removed because the final build system generates the board module inOUT_DIR.Motivation
cargo fmtfollows the Rust module graph. Board files underplatform/and Rust examples underhvisor-tool/were outside that graph, and the old format workflow had to create a source-tree symlink just to makecargo fmtresolvesrc/platform/mod.rs. That left most board files unchecked.The repository also contains C, JSON, YAML, TOML, and Python configuration and tooling; formatting them in one dedicated workflow avoids duplicating format commands between
ci.ymland local scripts.Verification
Passed:
cargo fmt --all -- --checkrustfmt --check --edition 2021for all non-src Rust:build.rsplatform/*/*/board.rs(all 23 board files)hvisor-tool/examples/**/*.rsaarch64/qemu-gicv3build was rechecked on the stacked branch.Not run locally:
These run in GitHub Actions and are limited by locally installed tools.
Risks and Limitations