Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang-format #107

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ jobs:
format-check:
runs-on:
group: default
env:
CLANG_RELEASE: 18
strategy:
fail-fast: false
matrix:
release:
- 18
container: libfn/ci-build-clang:${{ matrix.release }}
container: libfn/ci-build-clang:${{ env.CLANG_RELEASE }}
steps:
- name: Check version
run: |
clang-format --version | grep -F "clang-format version ${{ matrix.release }}"
clang-format --version | grep -F "clang-format version ${CLANG_RELEASE}"

- uses: actions/checkout@v4

- name: Format source files
run: find include tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${{ matrix.release }} -i
run: find include tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${CLANG_RELEASE} -i

- name: Check for differences
id: assert
shell: bash
run: |
set -o pipefail
git diff --exit-code | tee "clang-format.patch"
Expand Down Expand Up @@ -65,6 +65,6 @@ jobs:
in your repo, commit, and push.
run: |
echo "${PREAMBLE}"
clang-format-${{ matrix.release }} --version
clang-format-${CLANG_RELEASE} --version
echo "${SUGGESTION}"
exit 1