Kernel Normal Form
Jump to navigation Jump to search
- Use tabs to indent code.
- Use spaces to position comments that appear to the right of code.
- For functions and control blocks, the brace goes on its own line.
- Control blocks can be compressed to
- Spaces around operators are recommended, around
- The parenthesis following a keyword is always prefixed by a space.
- Following a function call or declaration, there is no space between the name and the opening parenthesis.
- Function names use Java style lowerCamelCase, following Java conventions on capitalization edge cases.
- Avoid unnecessary abbreviation in function names as reasonable.
- Global tables are named after the related structure with the suffix "tab", such as
- The top of any file should contain a comment with the file name and major public functions (as well as the copyright once it is determined)
- Functions should follow normal javadoc (doxygen in our case) style
- Comments should be follow /* ... */ style and vary depending on line size