-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Stabilize new naming conventions #1044
Comments
This naming convention can be problematic when we want to refer to a member variable via methods:
|
is this for the cabin codebase itself? |
Yes, users can control it via .clang-tidy on their codebase depending on their preferences |
IIRC, that’s from system headers. I think I was passing a flag to suppress that useless outputs, but maybe newer clang-tidy doesn’t recognize it anymore? I’ll take a look, but the important thing here is if you have any violations, you should see errors because all warning on this project will be treated as errors: Line 3 in 7d31d74
|
Idea
PascalCase
PascalCase
snake_case
snake_case_
camelCase
camelCase_
Reasoning/Explanation
snake_case
since they tend to be shorter than functions.m
prefix?m_
forsnake_case
andm
forcamelCase
.m_
andm
are inconsistent.m_snake_case
is longer thansnake_case_
._
suffix, which is similar to Google's C++ Coding Style._
suffix because they have methods, and within methods, variables/functions and members are hard to be distinguished. (Structs won't have methods. => this is different from Google's)Steps to apply this new policy
Class (non-struct) Methods
naming convention.Class (non-struct) Member Variables
naming convention.Variables
naming convention.See also
The text was updated successfully, but these errors were encountered: