Coding guidelines#
Warning
Under Construction
Common guidelines#
Refer to the following links for now:
Also, keep in mind the following concepts.
- Keep things consistent.
- Automate where possible, using simple checks for formatting, syntax, etc.
- Write comments and documentation in English.
- Functions that are too complex (low cohesion) should be appropriately split into smaller functions (e.g. less than 40 lines in one function is recommended in the google style guideline).
- Try to minimize the use of member variables or global variables that have a large scope.
- Whenever possible, break large pull requests into smaller, manageable PRs (less than 200 lines of change is recommended in some research e.g. here).
- When it comes to code reviews, don't spend too much time on trivial disagreements. For details see:
- Please follow the guidelines for each language.
Autoware Style Guide#
For Autoware-specific styles, refer to the following:
- Use the
autoware_
prefix for package names. - Add implementations within the
autoware
namespace. - The header files to be exported must be placed in the
PACKAGE_NAME/include/autoware/
directory. - In
CMakeLists.txt
, useautoware_package()
.