@@ -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.
1213The workflow visible at ` cpp-tools/.github/workflows/cpp-tools.yml ` belongs to
1314the 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
4546sudo 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
98100A 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
105108This installs ` .git/hooks/pre-commit ` . Re-run after ` git clone ` on a fresh
0 commit comments