mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-05 21:52:26 +00:00
Add a few guidelines and some references to other projects that have decent coding styles
parent
a46033314b
commit
65fe2243ec
11
General-Coding-Guidelines.md
Normal file
11
General-Coding-Guidelines.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
We don't have strict coding standards, but these few guild lines will help. First a few of the more strict guidelines.
|
||||||
|
* Indentation is done in tabs not spaces. You can always change your editors tab stop to make it easier for you.
|
||||||
|
* `using namespace std;` is forbidden. The std namespace is large and can cause problems blindingly including everything.
|
||||||
|
|
||||||
|
And for the less strict guidelines.
|
||||||
|
* You should break up your if they are getting too long, we don't have strict limits of 80 characters per line like some projects, but you need to remember not everyone has the same screen resolution as you.
|
||||||
|
* If you are editing a function or block of code you should try to follow the style already present, unless the readability of the function is sufficiently poor that you feel it would be best to change it.
|
||||||
|
|
||||||
|
Most importantly, make the code readable.
|
||||||
|
|
||||||
|
Further reading: [Linux Kernel Coding Style](https://www.kernel.org/doc/Documentation/CodingStyle) is mostly logical and not all that ridiculous, we don't adhere to all of the rules that they do, but it is a fairly good base.
|
||||||
Loading…
x
Reference in New Issue
Block a user