Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ CheckOptions:
value: CamelCase
- key: readability-identifier-naming.MethodCase
value: camelBack
- key: readability-identifier-naming.ParameterCase
value: lower_case
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ repository has an `AGENTS.md` with conflicting rules they should take priority.
- Add the LiveKit copyright header with the correct year to new code files.
- Prefer the constructor initializer list rather than variable declaration
and assignment in the constructor body.
- Use `CamelCase` for types/classes, `camelBack` for methods, and
`snake_case` for parameters (enforced by `readability-identifier-naming`).
- For Doxygen/doc comments, prefer `///` comment style and use @brief,
@param, @return, @throw, @ref, @note, @warning as applicable.

Expand Down
3 changes: 2 additions & 1 deletion docs/clang-tidy.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ for all available checks.
| `modernize-*` | Encourages modern C++17 idioms: `auto`, range-for, `override`, `nullptr`, smart pointers. |
| `readability-misleading-indentation` | Catches indentation that suggests a different control flow than what actually executes. |
| `readability-redundant-smartptr-get` | Flags `ptr.get()` calls where `*ptr` or `ptr->` would suffice – reduces noise and makes smart pointer usage idiomatic. |
| `readability-identifier-naming` | Enforces consistent class and method naming conventions across LiveKit C++ projects. |
| `readability-identifier-naming` | Enforces consistent class, method, and parameter naming conventions across LiveKit C++ projects. |
| `misc-const-correctness` | Similar to Rust, ensures variables are immutable by default unless intended to be changed. |

## Excluded Checks
Expand Down Expand Up @@ -73,6 +73,7 @@ shared LiveKit C++ style.
| `FormatStyle: file` | Uses the project’s `.clang-format` for any auto-fix formatting, keeping fixes consistent with the existing code style. |
| `readability-identifier-naming.ClassCase: CamelCase` | Requires class names to use `CamelCase`. |
| `readability-identifier-naming.MethodCase: camelBack` | Requires method names to use `camelBack`. |
| `readability-identifier-naming.ParameterCase: lower_case` | Requires function and method parameters to use `snake_case` (e.g. `well_known`, `track_name`). Without this option, `readability-identifier-naming` ignores parameter names even though the check itself is enabled. |

## Other Settings

Expand Down