From ba36b2d2293d72d087072254e6371d9089f192b7 Mon Sep 17 00:00:00 2001
From: Sebastian Kunert <skunert49@gmail.com>
Date: Tue, 14 Jan 2025 18:56:30 +0100
Subject: [PATCH] CI: Only format umbrella crate during umbrella check (#7139)

The umbrella crate quick-check was always failing whenever there was
something misformated in the whole codebase.
This leads to an error that indicates that a new crate was added, even
when it was not.

After this PR we only apply `cargo fmt` to the newly generated umbrella
crate `polkadot-sdk`. This results in this check being independent from
the fmt job which should check the entire codebase.
---
 .github/workflows/checks-quick.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/checks-quick.yml b/.github/workflows/checks-quick.yml
index 4c26b85a630..1a8813833de 100644
--- a/.github/workflows/checks-quick.yml
+++ b/.github/workflows/checks-quick.yml
@@ -138,7 +138,7 @@ jobs:
           # Fixes "detected dubious ownership" error in the ci
           git config --global --add safe.directory '*'
           python3 scripts/generate-umbrella.py --sdk . --version 0.1.0
-          cargo +nightly fmt --all
+          cargo +nightly fmt -p polkadot-sdk
 
           if [ -n "$(git status --porcelain)" ]; then
             cat <<EOF
-- 
GitLab