[clang] Support variable empty lines between include categories (PR #183960)
Tobias Erbsland via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 01:39:41 PST 2026
erbsland-dev wrote:
Thanks for the feedback — I understand the hesitation around adding new formatting options.
Just to clarify: The goal is to make the separation between include categories (which IncludeBlocks: Regroup already introduces) configurable per category, rather than being implicitly fixed at one line.
The implementation keeps default behavior unchanged, only applies when regrouping is active, and generalizes an existing formatting decision instead of introducing a special case.
I don’t have a specific public style guide to point to — this came from real-world usage where category separation carries structural meaning. That said, I agree clang-format should prioritize widely adopted styles over aesthetic flexibility.
If the consensus is that this adds unnecessary surface area, I’m fine with closing the PR. I mainly wanted to explore whether this level of configurability fits within clang-format’s philosophy.
https://github.com/llvm/llvm-project/pull/183960
More information about the cfe-commits
mailing list