chore: Adjust Clang-format linter rules
120 Column Lines Block Indent for Bracket Align Custom Line Break Rules No Single Line Functions
This commit is contained in:
@ -13,16 +13,40 @@ BasedOnStyle: LLVM
|
||||
# Turn off LLVM default alignment of params with the opening bracket,
|
||||
# which can be less readable in some cases in our code base.
|
||||
#
|
||||
# Using `AlwaysBreak` will result in:
|
||||
# Using `BlockIndent` will result in:
|
||||
# void fooBarBazQuxHelloWorld(
|
||||
# int a,
|
||||
# int b);
|
||||
# int b
|
||||
# );
|
||||
#
|
||||
# Instead of:
|
||||
# void fooBarBazQuxHelloWorld(int a,
|
||||
# int b);
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
|
||||
# Turn off LLVM default packing of ctor initializers.
|
||||
# This makes it easier to see which members were initialized and in what order.
|
||||
PackConstructorInitializers: CurrentLine
|
||||
|
||||
# up our limit to 120
|
||||
ColumnLimit: 120
|
||||
|
||||
# Custom Breaking rules
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: true
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
|
||||
# no single line functions
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
|
||||
Reference in New Issue
Block a user