-
Notifications
You must be signed in to change notification settings - Fork 0
Style & Standards
Tianshu Huang edited this page Sep 19, 2018
·
3 revisions
Coding style and standards for Region V Robotics
Revision 0, 9/4/2018. Written by Tianshu Huang.
- PEP-8
- files < 200 lines
- numpy-style docstrings
- Doxygen with JAVADOC_AUTOBRIEF
-
{gets own line - 4 space indent
If you want everyone to love you, please read the full style specifications:
If you really don't feel like reading the full documentation, just follow these rules until someone yells at you.
- Maximum of 79 characters per line
- Indent with four spaces. NO TABS.
- Try to keep files under 250 lines. Files over 300 lines should be split immediately. This rule does not apply to configuration, definition, or documentation files.
- Try to keep functions under 50 lines.
- Constants (and
#defines in C and C++) inALL_CAPS_WITH_UNDERSCORES - Files named as
lower_case_with_underscores - Variables as
lower_case_with_underscores(python) orlowerCamelCase(C/C++) - Classes in
UpperCamelCase - Two newlines between top level blocks - functions, classes, etc.
- At most one newline within a logical block (within a function, class, etc.)