Coding Standard for the RingoJS Project
This document collects the coding standards that are in use in the Ringo code base. Ultimately, there is one golden rule almost universally applicable to open source projects:
If you are extending, enhancing, or bug fixing already implemented code, use the style that is already being used so that the source is uniform and easy to follow.
(Formulation taken from the LLVM Coding Standards.)
Hard rules (no exceptions!) for contributions:
- Use 4 spaces for indentation
- Prefer spaces over tabs: do not use tabs
Contributions will be rejected unless they conform to above rules.
"Softer" rules widely adhered to in the Ringo, but not yet formally prescribed:
- Write your code in lines no longer than 80 characters
- Avoid trailing whitespace (i.e. additional spaces at the end of a line or additional newlines at the end of a file)
- Prefer single quoted strings