Clang format documentation as .clang-format

Hi all,

Yesterday I was (manually) going through all the clang format options and crafting a format file for our organisation. While doing that I wondered: wouldn’t it be great if the documentation of clang-format was actually a .clang-format file!

I.e. the docs could be a simple as:

AlignTrailingComments: false

If true, aligns trailing comments.

true: false:

int a; // My comment a vs. int a; // My comment a

int b = 2; // comment b int b = 2; // comment about b

AllowAllParametersOfDeclarationOnNextLine: true

If the function declaration doesn’t fit on a line, allow putting all parameters of a function

declaration onto the next line even if BinPackParameters is false.


void myFunction(

int a, int b, int c, int d, int e);


void myFunction(int a,

int b,

int c,

int d,

int e);

I understand this isn’t markdown, but this would tremendously improve the ease of making your “own” clang-format specs.

Right now are some websites which help you with this:

But neither supports v8, for example, nor do they contain the actual docs of the functions…