-
Notifications
You must be signed in to change notification settings - Fork 40
Repository rules and code style
OpenArena/gamecode currently uses Travis CI to verify that the code compiles.
The OpenArena/gamecode have a number of protected branches.
This includes the "master" branch and a branch for each released versions.
The "master" does NOT allow force-push and the branch MUST ALWAYS compile on Travis CI. This is enforced by Github rules. The oa-0.8.5 and oa-0.8.8 does not allow force-push either. Although they are not required to compile on Travis CI. Note that the relaxation for Travis CI is only because the branches was created before the CI system was introduced.
Generally just try to be sane. The style is a mess.
The code uses tab characters for indentation as it is by far the dominant indentation in the code. If you find space indented code (and there are still several hundred lines) feel free to change them to tabs.
Try to use brackets for if statements like:
if (qtrue) {
something();
}
This is REQUIRED if you have more than one physical line like:
if (qtrue) {
// This is a comment
something();
}
There are no upper limit for a line length (as the tab with is undefined) but try to keep it sane. I keep a limit of 150 chars but if I exceed it I often split it in more than two lines. It is case by case. Just don't split it if keeping it on one line makes it more readable.
The code is not compiled with warnings and errors due to the number of compilers used and the different warnings on them. However: Fix warnings in the code if you see any. The gcc build on Travis: https://travis-ci.org/OpenArena/gamecode should be warning free.