Skip to content

Commit f7228f0

Browse files
committed
Update format check workflow
1 parent 1507551 commit f7228f0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/check-format.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,21 @@ jobs:
4040
4141
# Check formatting for each file
4242
for file in $files; do
43-
if clang-format -output-replacements-xml "$file" | grep -q '<replacement '; then
43+
echo "Checking formatting for file: $file"
44+
45+
# Run clang-format and capture the output
46+
output=$(clang-format -output-replacements-xml "$file")
47+
48+
# Print the output for debugging
49+
echo "clang-format output for $file:"
50+
echo "$output"
51+
52+
# Check for formatting issues
53+
if echo "$output" | grep -q '<replacement '; then
4454
echo "Formatting issues found in $file"
4555
formatting_issues=1
56+
else
57+
echo "No formatting issues found in $file"
4658
fi
4759
done
4860

0 commit comments

Comments
 (0)