Add prefix policy to CONTRIBUTING.md

master
emersion 7 years ago
parent b0d99f5c67
commit f9f75a1362
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

@ -93,7 +93,7 @@ not use GNU extensions.
### Brackets ### Brackets
Brackets always go on the same line, including in functions. Brackets always go on the same line, including in functions.
Always include brackets for if/while/for, even if it's a single statement. Always include brackets for if/while/for, even if it's a single statement.
```c ```c
void function() { void function() {
@ -114,7 +114,7 @@ void function() {
Indentations are a single tab. Indentations are a single tab.
For long lines that need to be broken, the continuation line should be indented For long lines that need to be broken, the continuation line should be indented
with an additional tab. with an additional tab.
If the line being broken is opening a new block (functions, if, while, etc.), If the line being broken is opening a new block (functions, if, while, etc.),
the continuation line should be indented with two tabs, so they can't be the continuation line should be indented with two tabs, so they can't be
misread as being part of the block. misread as being part of the block.
@ -139,9 +139,10 @@ breaking points so your code is easy to read.
### Names ### Names
Function and type names should be prefixed with `wlr_submodule_` (e.g. `struct Global function and type names should be prefixed with `wlr_submodule_` (e.g.
wlr_drm_plane`, `wlr_output_set_cursor`). For static functions and types local `struct wlr_output`, `wlr_output_set_cursor`). For static functions and
to a file, the names chosen aren't as important. types local to a file, the names chosen aren't as important. Local function
names shouldn't have a `wlr_` prefix.
For include guards, use the header's filename relative to include. Uppercase For include guards, use the header's filename relative to include. Uppercase
all of the characters, and replace any invalid characters with an underscore. all of the characters, and replace any invalid characters with an underscore.

Loading…
Cancel
Save