Contributions to this repository can be made under the GitHub Terms of Service, i.e. that you license your contributions under same license the project uses ("inbound = outbound").
The rest of this file describes general expectations for contributions, offered in a spirit of saving everyone a bunch of hassle.
There is some documentation collected in the doc/ directory,
although it is of unknown accuracy at this point. Please update any
appropriate documentation as part of your PR. Feel free to convert
documentation to Markdown.
There is a basic unit testing framework in place using the
Criterion library. Please take
advantage of it in order to refactor safely and to document any
behavioral changes you have made. Please ensure all tests pass on your
PR, even when compiling with -Wall -Wextra -Werror. Continuous
integration is provided by Travis
CI.
The code is of varying quality, having been assembled by a number of authors over the years, so please help us clean it up gradually. The basics are:
- on supported platforms, MUST NOT generate compiler warnings; you
can check this when you build via
CFLAGS="-Wall -Wextra -Werror" ./configure". - SHOULD use two spaces for indents, no tabs
- open braces SHOULD be at the end of the prior line, not on a line by themselves
Existing code has been formatted with:
gindent -bap -bli0 -l79 -ncs -npcs -lc79 -br -brf -brs -nut -i2 -nce -npsl
Consider using this to keep your additions stylistically agreeable.
As inspired by the contribution guidelines from the Sirius project, PRs should:
- be from a forked project with a relevant branch name
- be narrowly focused with no more than 3 or 4 logical commits
- when possible, address only one issue
- refer to any related issues by issue number
The PhoneGap project has a good set of guidelines we also use:
- First line should be maximum 50 characters long
- It should summarise the change and use imperative present tense
- The rest of the commit message should come after a blank line
- We encourage you to use Markdown syntax in the rest of the commit message
- Preferably keep to an 72 character limit on lines in the rest of the message.
If a commit is related to a particular issue, put the issue number after a hash (#) somewhere in the detail. You can put the issue number in the first line summary, but only if you can also fit in a useful summary of what was changed in the commit.
Here's an example commit message:
No more autorent charges
Although by default the codebase compiles with `-DNEW_RENT`, which
sets the normal rent price to 0 gold/day, as indicated by `offer`,
players were getting charged more than zero coins when they rejoined
the game. This addresses issue #17.