Pekka Paalanen <[email protected]> writes: > On Thu, 14 Mar 2019 18:11:47 +0530 > Harish Krupo <[email protected]> wrote: > >> Pekka Paalanen <[email protected]> writes: > >> > FYI, one thing I would never want to see in a patch is adding >> > '/* clang-format off */' kind of directives into code. >> > >> >> /* clang-format off */ directive is supposed to be used sparingly. If >> the whole code is commented out that way then I believe the reviewer >> should point that out. We could also add a check in the CI to >> ensure that the /* clang-format off */ and /* clang-format on */ pair >> don't span more than a few lines at a time. > > Hi Harish, > > no, I really mean they should never be used at all. If they are > actually necessary even once, then we did something wrong: we made it > an error in CI instead of only a warning, the format checker was was a > bad choice, or the format definition is off. > > If the directive is only needed sparingly, then it is not needed at > all, because reviewers can just say the checker in CI is wrong and merge > the patch with style warnings. If that becomes a hindrance, then it's > not "sparingly" anymore.
Makes sense. I will create a config with all the necessary options for clang-format and probably we can then discuss if they make sense. Thank you Regards Harish Krupo > > > Thanks, > pq > _______________________________________________ > wayland-devel mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
