-
Notifications
You must be signed in to change notification settings - Fork 217
DOCS: Expand code style guide #1143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
👋 Hi michal-shalev! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
Signed-off-by: Michal Shalev <[email protected]>
9c83e85 to
701dacf
Compare
| * Namespaces (e.g., `namespace nixl_utils`) | ||
| * Type aliases with `_t` suffix (e.g., `using test_params_t = std::vector<int>`) | ||
| * Enum class names with `_t` suffix (e.g., `enum class status_t`) | ||
| * Constants - `const` and `constexpr` variables (e.g., `constexpr int default_port = 8080`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to add global variables instead.
| }; | ||
|
|
||
| // Initialize connection state (regular comment, not documentation) | ||
| auto state = ConnectionState::DISCONNECTED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| auto state = ConnectionState::DISCONNECTED; | |
| auto state = connection_state_t::DISCONNECTED; |
What?
Expand
CodeStyle.mdwith comprehensive naming conventions, formatting rules, and documentation standards aligned with.clang-formatsettings.Why?
The original style guide was minimal and lacked clarity on key conventions like:
This created ambiguity for contributors and made it difficult to enforce consistent style.
How?
Added detailed sections for naming conventions, file organization, formatting (aligned with .clang-format), and comments (Doxygen). Updated all code examples to use lower camel case consistently.