Skip to content

Commit

Permalink
Fix clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronek committed Oct 19, 2024
1 parent 298a66b commit d94df97
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Prepare
run: |
container=${{ container }}
RELEASE=${container##*:}
echo "RELEASE=${container##*:}" >> $GITHUB_ENV
clang-format --version | grep -F " version ${RELEASE}"
- name: Format source files
run: find include tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${CLANG_VERSION} -i
run: find include tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${{ env.RELEASE }} -i

- name: Check for differences
id: assert
Expand Down Expand Up @@ -58,6 +65,6 @@ jobs:
in your repo, commit, and push.
run: |
echo "${PREAMBLE}"
clang-format-${CLANG_VERSION} --version
clang-format-${{ env.RELEASE }} --version
echo "${SUGGESTION}"
exit 1

0 comments on commit d94df97

Please sign in to comment.