On 2025-11-18 01:50, Kohei Yoshida wrote:
I was not around when the project introduced clang-format, so I can't speak for the original motivation. But, as someone who has used clang- format for other projects, I have to say one advantage is that you don't have to think about what coding styles to apply when making changes to parts of the code that others maintain. Speaking about this project in particular, when different parts of the same codebase use different coding styles, this can become an issue especially people tend to taking coding styles quite personally.So, avoiding to reformat is not the only advantage of using clang-format.
I agree, and am in favor of keeping clang-format.Having an (at least more) consistent coding style across the code base in my opinion also helps with readability of the code. (My earlier https://lists.freedesktop.org/archives/libreoffice/2025-February/093010.html has some more thoughts on that.)
I personally also appreciate not having to be too creative myself with how I format source code, but a `git clang-format` e.g. after introducing a new method takes care of this, e.g. breaking long lines at a reasonable place and I don't have to think about where exactly to break the line, how far to indent the next one, whether to put the operators on the previous or next line,... (To be clear, thoughtlessly running `git clang-format` after changing existing code can result in also changing completely unrelated lines of code, which I think should be avoided.)
OpenPGP_signature.asc
Description: OpenPGP digital signature
