From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH 1/8] STYLE: document rules for calls, block comments, ternary ops
Date: Thu, 13 Jun 2019 08:12:01 -0300 [thread overview]
Message-ID: <878su5d9j2.fsf@tethera.net> (raw)
In-Reply-To: <20190613110837.6256-2-david@tethera.net>
David Bremner <david@tethera.net> writes:
> ---
> devel/STYLE | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/devel/STYLE b/devel/STYLE
> index da653124..aa9f0f3d 100644
> --- a/devel/STYLE
> +++ b/devel/STYLE
> @@ -53,11 +53,18 @@ 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.
> +
> +* Nested ternary operators should be parenthesized at least as as much
> + as "a ? (b ? c : d)"
This rule is uh, invalid C. So that needs to be updated. The scenario
I was trying to describe is
foo = a ? (
b ) : d
(it turns out nesting isn't the main point). This is really just a hack
to make uncrustify and emacs alignment match.
next prev parent reply other threads:[~2019-06-13 11:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 11:08 v2 uncrustify David Bremner
2019-06-13 11:08 ` [PATCH 1/8] STYLE: document rules for calls, block comments, ternary ops David Bremner
2019-06-13 11:12 ` David Bremner [this message]
2019-06-13 11:08 ` [PATCH 2/8] uncrustify: indent classes David Bremner
2019-06-13 11:08 ` [PATCH 3/8] CLI: replace some constructs with more uncrustify friendly ones David Bremner
2019-06-16 17:09 ` Daniel Kahn Gillmor
2019-06-17 5:01 ` David Bremner
2019-06-17 15:40 ` Daniel Kahn Gillmor
2019-06-13 11:08 ` [PATCH 4/8] cli: run uncrustify David Bremner
2019-06-13 19:52 ` Tomi Ollila
2019-06-14 10:30 ` David Bremner
2019-06-14 10:50 ` David Bremner
2019-06-13 11:08 ` [PATCH 5/8] util: " David Bremner
2019-06-13 11:08 ` [PATCH 6/8] compat: " David Bremner
2019-06-13 11:08 ` [PATCH 7/8] parse-time-string: " David Bremner
2019-06-13 11:08 ` [PATCH 8/8] lib: " David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878su5d9j2.fsf@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).