diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-26 11:18:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-26 11:18:01 +0200 |
commit | fac2c3e25fb77a9bc934c21bc172db6d0475d751 (patch) | |
tree | f25a9f5c082e3666ae83f83f908068a7ce7155a1 /CONTRIBUTING.md | |
parent | 31857c9ed40a6bf34273b0459d2aa604642d1807 (diff) | |
parent | 625a7a48dc9f348a7556b03dd3c10a6a7d9c6037 (diff) |
Merge pull request #882 from emersion/unprefix-local-symbols
Remove wlr_ prefix from local symbols
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f01eb82c..fc5ccd9b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -93,7 +93,7 @@ not use GNU extensions. ### 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. ```c void function() { @@ -114,7 +114,7 @@ void function() { Indentations are a single tab. 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.), the continuation line should be indented with two tabs, so they can't be misread as being part of the block. @@ -139,9 +139,10 @@ breaking points so your code is easy to read. ### Names -Function and type names should be prefixed with `wlr_submodule_` (e.g. `struct -wlr_drm_plane`, `wlr_output_set_cursor`). For static functions and types local -to a file, the names chosen aren't as important. +Global function and type names should be prefixed with `wlr_submodule_` (e.g. +`struct wlr_output`, `wlr_output_set_cursor`). For static functions and +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 all of the characters, and replace any invalid characters with an underscore. |