From 24499529ebec4c186094f3b392796295b8ea807f Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Sat, 10 Jan 2026 21:34:17 +0800 Subject: [PATCH] docs: Fix naming conventions documentation - Update Functions/Methods to use PascalCase (was incorrectly documented as snake_case) - Add note about trivial getters using snake_case (e.g., name(), type_id()) - Update Constants to use k prefix with PascalCase (was incorrectly documented as UPPER_SNAKE_CASE) --- mkdocs/docs/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mkdocs/docs/index.md b/mkdocs/docs/index.md index dd5d098fc..5df1a6503 100644 --- a/mkdocs/docs/index.md +++ b/mkdocs/docs/index.md @@ -73,9 +73,10 @@ We follow modern C++ best practices: - **C++23 Standard**: Use C++23 features where appropriate - **Naming Conventions**: - Classes: `PascalCase` (e.g., `TableScanBuilder`) - - Functions: `snake_case` (e.g., `find_field_by_name`) + - Functions/Methods: `PascalCase` (e.g., `CreateNamespace`, `ExtractYear`) + - Trivial getters: `snake_case` (e.g., `name()`, `type_id()`, `is_primitive()`) - Variables: `snake_case` (e.g., `file_io`) - - Constants: `UPPER_SNAKE_CASE` (e.g., `MAX_RETRIES`) + - Constants: `k` prefix with `PascalCase` (e.g., `kHeaderContentType`, `kMaxPrecision`) - **Memory Management**: Prefer smart pointers (`std::unique_ptr`, `std::shared_ptr`) - **Error Handling**: Use `Result` types for error propagation - **Documentation**: Use Doxygen-style comments for public APIs