Skip to content

Commit bd345bc

Browse files
Latest cpp-tools
1 parent cd3d4ad commit bd345bc

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,11 @@ local `livekit-server --dev`, and run via `ctest` or directly. See
246246

247247
`clang-tidy` and `clang-format` are provided by the `cpp-tools` submodule.
248248
`valgrind` and Doxygen remain documented with the rest of the local developer
249-
tools. Set up the pre-commit auto-formatter with:
249+
tools. Install the shared clang configuration and pre-commit auto-formatter
250+
with:
250251

251252
```bash
252-
./cpp-tools/install-pre-commit.sh
253+
./cpp-tools/install.sh
253254
```
254255

255256
See [docs/tools.md](docs/tools.md).

docs/tools.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ are also enforced in CI on PRs.
88
`clang-tidy` and `clang-format` are owned by the
99
[`livekit/cpp-tools`](https://github.com/livekit/cpp-tools) submodule. The
1010
`./cpp-tools/install.sh` script creates root `.clang-tidy` and `.clang-format`
11-
symlinks so editor integrations can discover them automatically.
11+
symlinks so editor integrations can discover them automatically, and installs
12+
the pre-commit auto-formatter.
1213
The workflow visible at `cpp-tools/.github/workflows/cpp-tools.yml` belongs to
1314
the submodule, not the SDK. GitHub loads that workflow from the separate
1415
`livekit/cpp-tools` repository at an immutable commit, then checks out this SDK
@@ -45,7 +46,8 @@ ask you to add `/opt/homebrew/opt/llvm/bin` (Apple Silicon) or
4546
sudo apt-get install clang-format clang-tidy clang-tools
4647
```
4748

48-
Install the shared configuration symlinks from the repository root:
49+
Install the shared configuration symlinks and pre-commit hook from the
50+
repository root:
4951

5052
```bash
5153
./cpp-tools/install.sh
@@ -96,10 +98,11 @@ Output is captured to `clang-format.log` at the repo root.
9698
## Pre-commit hook
9799

98100
A simple pre-commit hook that auto-formats staged C/C++ files using the
99-
project's `.clang-format` rules:
101+
project's `.clang-format` rules is included by the default installation. To
102+
install only the hook:
100103

101104
```bash
102-
./cpp-tools/install-pre-commit.sh
105+
./cpp-tools/install.sh precommit-hook
103106
```
104107

105108
This installs `.git/hooks/pre-commit`. Re-run after `git clone` on a fresh

0 commit comments

Comments
 (0)