Skip to content

Commit

Permalink
Merge pull request #437 from chu11/rfc7_c_test_expressions
Browse files Browse the repository at this point in the history
rfc7: break long test expressions to one per line
  • Loading branch information
mergify[bot] authored Dec 3, 2024
2 parents c944ef6 + 11aa0bc commit 33eedc0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec_7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ to one parameter per line, at the same indent level. Example:
FLUX_NODEID_ANY,
FLUX_RPC_RESPONSE);
10. Long test expressions connected by "AND" or "OR" operators SHOULD
be broken to one test expression per line at the same indent level.
Example:

.. code-block:: c
if (out->type == MY_EXPECTED_TYPE
&& out->bytes > LOW_END_RANGE
&& out->bytes < HIGH_END_RANGE) {
...
}
.. code-block:: c
if (flux_event_subscribe (h, "event.foo") < 0
|| flux_event_subscribe (h, "event.bar") < 0) {
...
}
Variable Names
==============
Expand Down

0 comments on commit 33eedc0

Please sign in to comment.