I have an if
statement that has several or
ed arguments. I have stacked them vertically as below for readability.
if (health.fla
The only solution I've found is usage pair of // clang-format off
and // clang-format on
comments. E.g.
// clang-format off
if (health.flag_a ||
health.flag_b ||
health.flag_c ||
health.flag_d ||
health.flag_e ||
health.flag_f ||
health.flag_g ||
health.flag_h ||
health.flag_i ||
health.flag_k) {
do_something();
return false;
}
// clang-format on
Yes, this is not a solution at all, but at least it prevents your stacked conditions from being re-formatted by clang-format
.