File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6969 steps :
7070 - uses : actions/checkout@v6
7171 with :
72- fetch-depth : 5
72+ fetch-depth : 0
7373 - name : Run clang-format
7474 run : |
7575 bash ./util/clang_format_all.sh
8383 git diff;) | tr '\n' '\001' | sed -e 's#\x01#%0A#g';
8484 exit 1;
8585 )
86+ - name : Check commit messages (PR)
87+ if : ${{ github.event_name == 'pull_request' }}
88+ run : |
89+ git log --oneline origin/${{github.base_ref}}.. > a
90+ echo "Changing individual clang-format commits:"
91+ cat a
92+ awk '{print $1}' a > b
93+ for COMMIT in $(cat b); do
94+ git checkout $COMMIT
95+ ./util/clang_format_all.sh --head-commit
96+ git diff --quiet || (
97+ (echo -n "::error::";
98+ echo "commit $COMMIT has clang-format issues. See CONTRIBUTING.md for more information.";
99+ echo;
100+ git diff;) | tr '\n' '\001' | sed -e 's#\x01#%0A#g';
101+ exit 1;
102+ )
103+ done
86104 cmake-minimum :
87105 name : Baseline cmake check
88106 needs : [commit-msg, clang-format]
You can’t perform that action at this time.
0 commit comments