Skip to content

Commit 9be423f

Browse files
Don't make precommit required
1 parent d09be00 commit 9be423f

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,18 @@ 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. Install the shared clang configuration and pre-commit auto-formatter
250-
with:
249+
tools. Install the shared clang configuration with:
251250

252251
```bash
253252
./cpp-tools/install.sh
254253
```
255254

255+
The pre-commit auto-formatter is opt-in:
256+
257+
```bash
258+
./cpp-tools/install.sh precommit-hook
259+
```
260+
256261
See [docs/tools.md](docs/tools.md).
257262

258263
## Deprecation

cpp-tools

docs/tools.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ 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, and installs
12-
the pre-commit auto-formatter.
11+
symlinks so editor integrations can discover them automatically.
1312
The workflow visible at `cpp-tools/.github/workflows/cpp-tools.yml` belongs to
1413
the submodule, not the SDK. GitHub loads that workflow from the separate
1514
`livekit/cpp-tools` repository at an immutable commit, then checks out this SDK
@@ -46,8 +45,7 @@ ask you to add `/opt/homebrew/opt/llvm/bin` (Apple Silicon) or
4645
sudo apt-get install clang-format clang-tidy clang-tools
4746
```
4847

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

5250
```bash
5351
./cpp-tools/install.sh
@@ -98,8 +96,7 @@ Output is captured to `clang-format.log` at the repo root.
9896
## Pre-commit hook
9997

10098
A simple pre-commit hook that auto-formats staged C/C++ files using the
101-
project's `.clang-format` rules is included by the default installation. To
102-
install only the hook:
99+
project's `.clang-format` rules is available as an explicit opt-in:
103100

104101
```bash
105102
./cpp-tools/install.sh precommit-hook

0 commit comments

Comments
 (0)