Skip to content

Commit

Permalink
Print clang-format version in use in CI format check.
Browse files Browse the repository at this point in the history
clang-format behaves slightly differently between versions. Print
out the version number used in the CI, so that it is possible
for contributors to verify that they run exactly the version
locally to avoid formatting issues in PRs.

Signed-off-by: Henner Zeller <[email protected]>
  • Loading branch information
hzeller committed Jan 11, 2025
1 parent 2e35fb1 commit 68e432e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/github-actions-format-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: tj-actions/changed-files@v41
- name: Check format of cpp changed files
run: |
clang-format --version
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ "${file##*.}" =~ ^(h|C|cc|cp|cpp|c++|CPP|cxx|hh)$ && "${file}" != "src/sta/"* && "${file}" != "src/odb/src/codeGenerator/"* ]]; then
clang-format --dry-run --Werror $file
Expand Down

0 comments on commit 68e432e

Please sign in to comment.