diff --git a/.github/workflows/cmake-lint.yml b/.github/workflows/cmake-lint.yml index cd2029066..e8d50ff72 100644 --- a/.github/workflows/cmake-lint.yml +++ b/.github/workflows/cmake-lint.yml @@ -23,4 +23,10 @@ jobs: - name: Run cmake-format run: | files=$(git ls-files '**/CMakeLists.txt' 'cmake/*.cmake') - cmake-format --check $files + if ! cmake-format --check $files; then + echo "Formatting errors detected. Showing diff..." + for f in $files; do + cmake-format "$f" | diff -u "$f" - + done + exit 1 + fi