mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-01 05:02:29 +07:00
Pin style-check and pre-commit to clang-format 23.1.0
CI relied on ubuntu-latest's default apt clang-format (18.1.3), while the pre-commit hook was pinned to a different 18.x build. Neither tracked a specific, deliberately-chosen version, and the two could drift from each other and from whatever a contributor has installed locally. Both now pin the same clang-format 23.1.0 (latest stable), installed via pipx in CI. Also scope the pre-commit hook's file matcher to the same set of files test/Makefile's style_check target checks, since the previous \.(cpp|cc|h)$ pattern reached into vendored code (test/gtest, benchmark/crow) that must stay untouched. Reformat httplib.h's brace-init spacing to match 23.1.0's output.
This commit is contained in:
@@ -37,6 +37,10 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: install clang-format
|
||||
run: |
|
||||
pipx install clang-format==23.1.0
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
- name: run style check
|
||||
run: |
|
||||
clang-format --version
|
||||
|
||||
Reference in New Issue
Block a user