On Thu, Aug 15, 2024 at 01:43:00AM +0300, Valeriy E. Ushakov wrote: > On Wed, Aug 14, 2024 at 22:56:19 +0200, Thomas Klausner wrote: > > > # newline before "{" except for functions > > BreakBeforeBraces: WebKit > > The comment seems to contradict the value? We use newline before "{" > for functions, but not for control flow &c.
Yes, sorry, the comment is the exact opposite of what happens :) Thomas
# 80 characters line length ColumnLimit: 80 # if comments get too long, fmt them. ReflowComments: true # default indentation level IndentWidth: 8 # also for struct initializers BracedInitializerIndentWidth: 8 # prefer using tabs to spaces when indenting UseTab: ForContinuationAndIndentation # indent 1 space more per #if-level PPIndentWidth: 1 # and put the space after the hash but before the keyword (i.e., "# if") IndentPPDirectives: AfterHash # backslashes at end-of-line are aligned, but as far left as possible AlignEscapedNewlines: Left # not supported in clang-format 18, would include the last line (without backslash) in the offset consideration #AlignEscapedNewlines: LeftWithLastLine # # if function arguments get too long, start new line indented by 4 AlignAfterOpenBracket: DontAlign ContinuationIndentWidth: 4 # but keep first parameters on the first line AllowAllParametersOfDeclarationOnNextLine: False AllowAllArgumentsOnNextLine: false # for struct's etc. use 8 characters indent as well ConstructorInitializerIndentWidth: 8 # attach "{", except for functions BreakBeforeBraces: WebKit # for functions, add newline after return type AlwaysBreakAfterReturnType: TopLevelDefinitions # align structure elements to the right AlignArrayOfStructures: Right