Skip to content

Commit

Permalink
[NFC] Fix clang format automation after 68d618f90
Browse files Browse the repository at this point in the history
The patch adds exit(1) in case if the clang-format reports an error
and it breaks our pre-commit CI.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
  • Loading branch information
MrSidims committed Nov 16, 2023
1 parent 3cfffb2 commit 7f7bf39
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/check-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@ jobs:
id: run-clang-format
run: |
cat diff-to-inspect.txt | /usr/share/clang/clang-format-${{ env.LLVM_VERSION }}/clang-format-diff.py \
-p1 -binary clang-format-${{ env.LLVM_VERSION }} > clang-format.patch
if [ -s clang-format.patch ]; then
echo "clang-format found incorrectly formatted code:"
cat clang-format.patch;
exit 1;
else
rm clang-format.patch # to avoid uploading empty file
fi
-p1 -binary clang-format-${{ env.LLVM_VERSION }}
- name: Run clang-tidy
# By some reason, GitHub Actions automatically include "success()"
Expand Down

0 comments on commit 7f7bf39

Please sign in to comment.