From: chaoskagami Date: Tue, 24 May 2016 00:30:03 +0000 (-0400) Subject: Coding standard info X-Git-Tag: stable-1~46 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=48d09fcab8a1234cd27909124d2538645443216c;p=corbenik%2Fcorbenik.git Coding standard info --- diff --git a/doc/coding-standard.md b/doc/coding-standard.md new file mode 100644 index 0000000..6e95411 --- /dev/null +++ b/doc/coding-standard.md @@ -0,0 +1,16 @@ +There's only *one* real hard rule: run `make reformat` before you commit. + +Format is a modified mozilla standard - four spaces, not two. + +Also, there's a few hard-enforced rules you need to obey if you want to submit code: + + 1) Avoid trigraphs at all costs. Only use them if it actually helps readability. + + 2) Any `#pragma` macros are banned. You're using linux and GCC, so stop using MSVCisms. + There's another few quirks about #pragma once that mean I have to use guards instead. + Use `__atrribute__` instead. + + 3) If by some odd chance you use inline assembly; use `__asm__`, not `asm`. + + 4) Do not remove `-Werror`. It's there for a reason. Your code should be squeaky clean; + if not, find a way to make your code correct. This is mandatory.