-
Notifications
You must be signed in to change notification settings - Fork 203
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
Add coding guidelines for maya-usd repository #380
Conversation
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.
Just some light copy editing and small formatting suggestions, but otherwise looks great to me!
Thanks @kxl-adsk!
doc/codingGuidelines.md
Outdated
#include <mayaUsd/nodes/stageData.h> | ||
``` | ||
|
||
Private project’s header files should be `#include`'d using the file name when in the same folder. Private headers may live in sub-directories, but they should never included using "._" or ".._" as part of a relative paths. For example: |
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.
Missing word: "should never be included"
doc/codingGuidelines.md
Outdated
``` | ||
|
||
### Cross-platform development | ||
* Consult the [build.md](https://github.com/Autodesk/maya-usd/blob/dev/doc/build.md) compatibility table to ensure you use the recommended tool (i.e., dcompiler, operating system, CMake, etc.) versions. |
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.
Typo: compiler ("dcompiler")
doc/codingGuidelines.md
Outdated
* MAYA_API_VERSION is the consistent macro to test Maya version (MAYA_APP_VERSION * 10000 + MAJOR_VERSION * 100 + MINOR_VERSION) | ||
* MAYA_APP_VERSION is available only since Maya 2019 and is a simple year number, so it is not allowed. | ||
**UFE** | ||
* WANT_UFE_BUILD equals 1 if UFE is found and it should be used for conditional compilation on codes depending on UFE. | ||
|
||
**USD** | ||
* USD_VERSION_NUM is the macro to test USD version (USD_MAJOR_VERSION * 10000 + USD_MINOR_VERSION * 100 + USD_PATCH_VERSION) |
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.
It might be good to wrap all these version variable names in backticks to make them stand out a little better in the rendered text.
doc/codingGuidelines.md
Outdated
* using (vs typedef) keyword | ||
* virtual, override and final keyword | ||
* default and delete keywords | ||
* auto keyword | ||
* initialization - {} | ||
* nullptr keyword |
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 wrap these C++ keywords in backticks too?
Thank you @mattyjams. We made a pass over it before opening PR, but you manage to find a few more typos! Good job. |
Add document to outline c++ coding guidelines for contributions to the maya-usd project.
Clang-format, CMake and Python guidelines will follow.