Skip to content

Commit 45e6236

Browse files
Enforce camel_case on contructor and member style
1 parent a3659e4 commit 45e6236

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ CheckOptions:
4141
value: CamelCase
4242
- key: readability-identifier-naming.MethodCase
4343
value: camelBack
44+
- key: readability-identifier-naming.ParameterCase
45+
value: lower_case

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ repository has an `AGENTS.md` with conflicting rules they should take priority.
9999
- Add the LiveKit copyright header with the correct year to new code files.
100100
- Prefer the constructor initializer list rather than variable declaration
101101
and assignment in the constructor body.
102+
- Use `CamelCase` for types/classes, `camelBack` for methods, and
103+
`snake_case` for parameters (enforced by `readability-identifier-naming`).
102104
- For Doxygen/doc comments, prefer `///` comment style and use @brief,
103105
@param, @return, @throw, @ref, @note, @warning as applicable.
104106

docs/clang-tidy.md

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

3030
## Excluded Checks
@@ -73,6 +73,7 @@ shared LiveKit C++ style.
7373
| `FormatStyle: file` | Uses the project’s `.clang-format` for any auto-fix formatting, keeping fixes consistent with the existing code style. |
7474
| `readability-identifier-naming.ClassCase: CamelCase` | Requires class names to use `CamelCase`. |
7575
| `readability-identifier-naming.MethodCase: camelBack` | Requires method names to use `camelBack`. |
76+
| `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. |
7677

7778
## Other Settings
7879

0 commit comments

Comments
 (0)