Skip to content

Conventions

Shane Kelly edited this page Sep 4, 2017 · 26 revisions

Commit Messages

Simple present tense only. Ex. "127: add new feature". Not "127: added new feature" nor "127: adding new feature".

Precede each message with the issue number and a colon, ex. "180: add chat function".

Background reading

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