You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit af0820c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+27-3Lines changed: 27 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -521,9 +521,9 @@ This SDK leverages various tools and checks to ensure the highest quality of the
521
521
### Clang Tools
522
522
523
523
-`clang-tidy`: static analysis checks to catch common C++ pitfalls. See [.clang-tidy](./.clang-tidy) for the list of current checks (enforced in CI on PR)
524
-
-`clang-format`: (coming soon) code formatting and style consistency
524
+
-`clang-format`: code formatting and style consistency. See [.clang-format](./.clang-format) for the list of style configurations (enforced in CI on PR)
525
525
526
-
> **Note**: clang-tidy is not currently supported on Windows for this project because the Visual Studio CMake generator does not produce the compile_commands.json database that clang-tidy requires.
526
+
> **Note**: For Windows, `clang-tidy` is not currently supported for this project because the Visual Studio CMake generator does not produce the compile_commands.json database that `clang-tidy` requires. Similarly, `clang-format` must be installed and run manually on Windows, referencing the root `.clang-format` file.
527
527
528
528
To run locally, first install the following:
529
529
@@ -542,7 +542,13 @@ This installs `clang-format`, `clang-tidy`, and `run-clang-tidy`. Homebrew may a
1. Generate `compile_commands.json` and the protobuf headers via a release build:
548
554
@@ -566,6 +572,24 @@ The wrapper forwards extra arguments to `run-clang-tidy`, examples below:
566
572
567
573
Output is captured to `clang-tidy.log` at the repo root. This is done as a convenience feature, as often times the terminal buffer is not large enough for all the output.
568
574
575
+
To run `clang-format`:
576
+
577
+
```bash
578
+
./scripts/clang-format.sh
579
+
```
580
+
581
+
With no arguments, runs `clang-format` against every relevant file in the repository against defined `.clang-format` rules.
582
+
583
+
Pass flags or paths as needed, examples below:
584
+
585
+
```bash
586
+
./scripts/clang-format.sh --fix # Rewrite files in place
587
+
./scripts/clang-format.sh src/room.cpp include/livekit/room.h # Check just these files
588
+
./scripts/clang-format.sh --fix src/room.cpp # Fix just this file
589
+
```
590
+
591
+
Output is captured to `clang-format.log` at the repo root.
592
+
569
593
### Memory Checks
570
594
571
595
Run valgrind on various examples or tests to check for memory leaks and other issues.
0 commit comments