From 9a1657586c046fa20b7505e9edab74ceca3d7977 Mon Sep 17 00:00:00 2001 From: Nasr Date: Tue, 31 Dec 2024 11:40:31 +0700 Subject: [PATCH] c --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be002272..3657780a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,5 +73,16 @@ jobs: - name: Check C# Formatting run: | - find . -name "*.csproj" -exec dotnet format --verify-no-changes {} \; - # The above command's exit code will be preserved and fail the action if needed + echo "Current working directory: $(pwd)" + echo "Directory contents:" + ls -la + + EXIT_CODE=0 + while IFS= read -r project; do + echo "Checking format for: $project" + if ! dotnet format --verify-no-changes "$project"; then + echo "❌ Formatting issues found in $project" + EXIT_CODE=1 + fi + done < <(find . -name "*.csproj") + exit $EXIT_CODE