-
Notifications
You must be signed in to change notification settings - Fork 15
Coding and Development Conventions
We write them as we need them!
Indentation is done using four spaces.
Spaces are portable between IDE's and render consistently on full screen editors like vim and emacs. Four is sufficiently large to emphasize loops and conditional statements (two is too small), but small enough to fit on most screens (eight is too large).
No bald pointers
int a=0 is just so much better behaved.
ANSI Standard C++ Only
Usage of the ANSI C++ standard helps to preserve backwards compatibility with older compilers.
Concerning the workflow, keep it simple.
- Minor changes to the code base are welcome as direct commits to the master.
- The addition of new features or resolution of major bugs are best handled with branches followed by pull requests.
- Feature and bug branches should be short-lived and deleted when complete.
- Releases are tags of the master.
If working on a feature or bug, please tag your branches and pull requests in the style of feature__short-description or bug__short-description (inspired from the BEM CSS style). There are several past examples you can look at, e.g. feature__offset-block.
This naming convention makes the branches/ pull requests easy to visually identify by type, simple to sort in the command line, and are better behaved syntactically than the bugs/short-description e.g. https://github.com/agis/git-style-guide.
Squash-merging is acceptable and encouraged if the edits are tightly coupled.