From 6876996548d615fdd540a8fc0712737b749bac53 Mon Sep 17 00:00:00 2001 From: Paul Mabileau Date: Sun, 18 Feb 2024 23:48:38 +0100 Subject: [PATCH] CI(Rustfmt): Update command to support unstable features Signed-off-by: Paul Mabileau --- .github/workflows/ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6f5c34..933e9be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,18 @@ jobs: run: cargo test --verbose --all-targets --all-features - name: Check correct rustfmt formatting - run: cargo fmt --verbose --all --check + # HACK: pass all configuration items via CLI to circumvent unstability restriction. + run: > + cargo fmt --verbose --all --check + -- --config-path=/dev/null --config=$( + cat rustfmt.toml | + sed -E 's/\#.*$//g' | + sed '/^$/d' | + sed 's/ //g' | + sed -Ez 's/(\r)?\n/,/g' | + sed 's/,$//' | + sed 's/"//g' + ) - name: Check clippy warnings run: cargo clippy --verbose --all-targets --all-features -- --deny warnings