File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: Copyright (c) 2025 Infineon Technologies AG
2+ #
3+ # SPDX-License-Identifier: BSD-2-Clause
4+
5+ name : Clang Format Checker
6+ on :
7+ [push, pull_request]
8+ jobs :
9+ clang-format-checking :
10+ runs-on : ubuntu-latest
11+ container :
12+ image : ghcr.io/tpm2-software/ubuntu-24.04
13+ steps :
14+ - name : Check out repository
15+ uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 1
18+ - name : Run clang-format
19+ run : clang-format -i $(find -name '*.h' -or -name '*.c' | xargs realpath)
20+ - name : Check for diffs
21+ run : git diff --exit-code
22+ - name : failure
23+ if : ${{ failure() }}
24+ run : |
25+ echo "Clang format check failed. Please run clang-format on your code or see the diff in the step above."
26+ echo "docker run -u $UID -v $PWD:$PWD ghcr.io/tpm2-software/ubuntu-24.04 clang-format -i $(find -name '*.h' -or -name '*.c' | xargs realpath)"
Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ full text of the DCO is here: https://developercertificate.org/. Contributors
4444must add a 'Signed-off-by' line to their commits. This indicates the
4545submitters acceptance of the DCO.
4646
47+ Please note that we now require REUSE and clang-format to also pass on PRs.
48+ You may run
49+ ``` sh
50+ docker run -u 1000 -v $PWD :$PWD xianpengshen/clang-tools:17 clang-format -i $( find -name ' *.c' | xargs realpath)
51+ docker run -u 1000 -v $PWD :$PWD xianpengshen/clang-tools:17 clang-format -i $( find -name ' *.h' | xargs realpath)
52+ ```
53+ before submitting in order to align with our format requirements.
54+
4755## Guideline for merging changes
4856
4957Pull Requests MUST be assigned to an upcoming release tag. If a release milestone does
You can’t perform that action at this time.
0 commit comments