Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 1.47 KB

CONTRIBUTING.md

File metadata and controls

48 lines (39 loc) · 1.47 KB

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Commits

Commit Messages

All commit messages MUST comply with Conventional Commits 1.0.0

Style Guide

Whitespace

  1. There must be one space character on each side of any binary operator (+, -, *, /, %).
  2. There must be one space character between a branching keyword and the conditional, e.g.:
while (cond)
{
    body
}
if (cond)
{
    body
}
for (cond)
{
    body
}
  1. All files must end with an empty line.
  2. All files must be indented with 4 spaces.

Static Functions

  1. Static function prototypes must live in their respective translation units.

Include Order

Note: Inclusion of <dirent.h> may need to be preceded by "Particle.h" to provide system definitions.

Includes should be organized in the following order:

  1. Application headers (with respect to the source root) in double quotes
  2. Library headers in angle brackets
  3. System headers in angle brackets
  4. Platform headers

Where C system headers are used, prefer the C style header over the C++ style header (e.g. string.h over cstring)

Return Values

Prefer returning error codes.

Error codes may be defined by documentation or by enumeration.

If returning a true or false value, prefer using bool.

assert is strictly prohibited in releasable code.