[Gluster-devel] Automatic clang-format for GitHub PRs
Xavi Hernandez
xhernandez at redhat.com
Wed Feb 10 09:58:49 UTC 2021
Hi all,
I'm wondering if enforcing clang-format for all patches is a good idea...
I've recently seen patches where clang-format is doing changes on parts of
the code that have not been touched by the patch. Given that all files were
already formatted by clang-format long ago, this shouldn't happen.
This means that as the clang-format version evolves, the formatting with
the same configuration is not the same. This introduces unnecessary noise
to the file history that I think it should be avoided.
Additionally, I've also seen some cases where some constructs are
reformatted in an uglier or less clear way. I think it's very hard to come
up with a set of rules that formats everything in the best possible way.
For all these reasons, I would say we shouldn't enforce clang-format to
accept a PR. I think it's a good test to run to catch some clear formatting
issues, but it shouldn't vote for patch acceptance.
What do you think ?
Regards,
Xavi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20210210/28b5b739/attachment.html>
More information about the Gluster-devel
mailing list