From 898d971fa19f54f3ae2cc3fa87844ce9b66868b9 Mon Sep 17 00:00:00 2001 From: Zohar Zilberman Date: Thu, 28 May 2026 21:34:41 +0300 Subject: [PATCH] Add cargo fmt check to test workflow Mirrors the formatting gate in platzio/backend so chart-ext PRs fail fast on style drift. Also reformats one pre-existing trailing-semicolon diff in ext_type.rs so the new check passes. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/test.yml | 13 +++++++++++++ src/ext_type.rs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a2907f..13a58d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,6 +8,19 @@ permissions: contents: read jobs: + fmt: + name: ๐ŸŽจ Check formatting + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ›  Checkout + uses: actions/checkout@v6 + + - name: ๐Ÿงฐ Install rustfmt + run: rustup component add rustfmt + + - name: ๐ŸŽจ Cargo fmt + run: cargo fmt --all -- --check + test: name: ๐Ÿงช ${{ matrix.task }} (${{ matrix.profile }}) runs-on: ubuntu-latest diff --git a/src/ext_type.rs b/src/ext_type.rs index 358c64b..33757ee 100644 --- a/src/ext_type.rs +++ b/src/ext_type.rs @@ -143,7 +143,7 @@ where T: Serialize + DeserializeOwned, { let Some(filename) = filename else { - return Ok(None) + return Ok(None); }; let full_path = path.join(filename);