Skip to content

Commit 51c37e7

Browse files
authored
ci: add Rustfmt check workflow (#22)
- Add GitHub Actions workflow for Rust formatting check - Workflow runs on push and pull request events - Uses stable Rust toolchain with rustfmt component - Checks code formatting using cargo fmt Signed-off-by: jinlong <jinlong@tencent.com>
1 parent 8f67d31 commit 51c37e7

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/format.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Format Check
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
rustfmt:
9+
name: Rustfmt Check
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Install Rust toolchain
16+
uses: dtolnay/rust-toolchain@stable
17+
with:
18+
components: rustfmt
19+
20+
- name: Check formatting
21+
run: cargo fmt --all -- --check

0 commit comments

Comments
 (0)