Skip to content

Conventions

Shane Kelly edited this page Aug 27, 2017 · 26 revisions

Commit Messages

https://github.com/erlang/otp/wiki/writing-good-commit-messages

Simple present tense only!

Assertions

We have created a standard function that checks to make sure a given statement is true and, if not, throws an error with a specified message.

All assert messages should state the current state of things if an error is thrown and should in almost all cases include the word not.

Examples:

If a variable x must be greater than or equal to variable y:

assert(x >= y, 'x is less than y');

If a variable x must be even:

assert(x % 2 === 0, 'x is not even');

Note that in this example, the assert does not say x is odd.

Clone this wiki locally