File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,21 @@ jobs:
16
16
if : ' !cancelled()'
17
17
run : |
18
18
clang-format -i */*.[ch]
19
- if git diff | grep ""; then
20
- (echo "Formatting errors detected by clang-format." \
21
- "Please run \`make format\`.";
19
+ git diff > formatting-fixes.diff
20
+ if ! grep "" formatting-fixes.diff; then
21
+ rm -f formatting-fixes.diff
22
+ else
23
+ (echo "Formatting errors detected by clang-format. Please run" \
24
+ "\`make format\` or apply formatting-fixes.diff below.";
22
25
echo) >> $GITHUB_STEP_SUMMARY
23
26
false
24
27
fi
28
+ - uses : actions/upload-artifact@v4
29
+ if : ' !cancelled()'
30
+ with :
31
+ if-no-files-found : ignore
32
+ name : formatting-fixes.diff
33
+ path : formatting-fixes.diff
25
34
- name : Check C89 compliance
26
35
if : ' !cancelled()'
27
36
env :
You can’t perform that action at this time.
0 commit comments