2008-08-30 13:09:15 +02:00
|
|
|
If you intend to patch and contribute to awesome, please respect the
|
|
|
|
following guidelines.
|
|
|
|
|
|
|
|
Imitate the existing code style. For concrete rules:
|
|
|
|
|
2008-11-12 14:27:23 +01:00
|
|
|
- Use 4 spaces indentation, do not use tabulator characters;
|
2008-08-30 13:09:15 +02:00
|
|
|
|
|
|
|
- Place braces alone on new lines, and do not place braces for single
|
|
|
|
line statement where it is not needed, i.e no:
|
|
|
|
if(bla) {
|
|
|
|
x = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
- Do not put a space after if, for, while or function call statements;
|
|
|
|
|
|
|
|
- The preferred line length is 80 characters;
|
|
|
|
|
|
|
|
- Use /* */ for comments;
|
|
|
|
|
|
|
|
- Use the API: there's a list of a_*() function you should use instead
|
|
|
|
of the standard libc ones. There is also common API for linked list,
|
|
|
|
tabulars, etc;
|
|
|
|
|
|
|
|
- Be clear in what you do;
|
|
|
|
|
2009-08-21 15:27:10 +02:00
|
|
|
- Prefix your function name with the module they are enhancing,
|
|
|
|
i.e. if you add a function to manipulate a tag prefix it with tag_.
|
|
|
|
|
2008-08-30 13:09:15 +02:00
|
|
|
- Write documentation for any new functions, options, whatever.
|
2007-10-15 13:40:52 +02:00
|
|
|
|
|
|
|
A vim modeline is set in each file to respect this.
|