Skip to content

Commit 1870b8e

Browse files
authored
Show diff on cmake lint failure (#481)
1 parent 3584545 commit 1870b8e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/cmake-lint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ jobs:
2323
- name: Run cmake-format
2424
run: |
2525
files=$(git ls-files '**/CMakeLists.txt' 'cmake/*.cmake')
26-
cmake-format --check $files
26+
if ! cmake-format --check $files; then
27+
echo "Formatting errors detected. Showing diff..."
28+
for f in $files; do
29+
cmake-format "$f" | diff -u "$f" -
30+
done
31+
exit 1
32+
fi

0 commit comments

Comments
 (0)