diff options
| author | David Bremner <david@tethera.net> | 2019-06-12 19:49:13 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2019-06-14 07:41:27 -0300 |
| commit | 87df05d181976638e0b3d44d586ce4d5cfe2bd0f (patch) | |
| tree | aedc3b2e2687a13a84acd3c8d2f10266358c7102 /devel | |
| parent | 2c4384a5763bdab308b8c417afa8d5f8e393b9a5 (diff) | |
STYLE: document rules for calls, block comments, ternary ops
Diffstat (limited to 'devel')
| -rw-r--r-- | devel/STYLE | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/devel/STYLE b/devel/STYLE index da653124..b18a9573 100644 --- a/devel/STYLE +++ b/devel/STYLE @@ -53,11 +53,19 @@ function (param_type param, param_type param) if/for/while test) and are preceded by a space. The opening brace of functions is the exception, and starts on a new line. -* Comments are always C-style /* */ block comments. They should start - with a capital letter and generally be written in complete - sentences. Public library functions are documented immediately - before their prototype in lib/notmuch.h. Internal functions are - typically documented immediately before their definition. +* Opening parens also cuddle, even if the first argument does not fit + on the same line. + +* Ternary operators that span a line should be parenthesized like as + "a ? (\n b ) : c". This is mainly to keep the indentation tools + happy. + +* Comments are always C-style /* */ block comments, with a leading * + each line. They should start with a capital letter and generally be + written in complete sentences. Public library functions are + documented immediately before their prototype in lib/notmuch.h. + Internal functions are typically documented immediately before their + definition. * Code lines should be less than 80 columns and comments should be wrapped at 70 columns. |
