Skip to content

Commit

Permalink
YDA-5623: fail workflow if code is not properly formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Mar 11, 2024
1 parent 3001fe1 commit ae093fa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/linter-irods-clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ jobs:
- name: Run ClangFormat
run: |
echo "warnings=$(clang-format -n src/* | wc -l)" >> "$GITHUB_ENV"
- run: |
echo "Source code is properly formatted. ${{ env.warnings }}";
exit 1
if: ${{ env.warnings }} == '0'
- run: |
echo "Source code needs to be formatted! ${{ env.warnings }}";
exit 1
if: ${{ env.warnings }} != '0'

0 comments on commit ae093fa

Please sign in to comment.