[openssl-project] Style guide updates
appro at openssl.org
Sun Jan 28 13:22:40 UTC 2018
> Multiline conditionals, such as in an if, should be broken before the
> logical connector and indented an extra tabstop. For example:
One can wonder if it would be appropriate to explicitly say that
preferred way to organize multi-line conditionals with same chain
condition per line even if pair of them fit into line. I mean
&& that && even-that)
with first example being preferred. And this is even if 'this-is-long'
[Or should one tolerate following provided that 'this' is short enough?
if (this && that
Either way, suggestion is that *if* you find yourself breaking condition
to multiple lines, you should take it step further, if not all the way.
But it shouldn't preclude things like
&& (that || (even-that && not-the-one))
This actually means that one should be able to write second example as
&& (that && even-that))
but it would imply that logical relation between 'that' and 'even-that'
is strong enough to justify the parentheses.
[Also note that in above examples additional indentation is just two
spaces. It's not a coincidence, it's also kind of suggestion, for
More information about the openssl-project