diff --git a/.clang-format b/.clang-format index 336989de..1cffeced 100644 --- a/.clang-format +++ b/.clang-format @@ -16,27 +16,29 @@ AlignAfterOpenBracket: Align # 连续赋值时,对齐所有等号 AlignConsecutiveAssignments: false # 对齐位域 -AlignConsecutiveBitFields: true +AlignConsecutiveBitFields: Consecutive # 连续声明时,对齐所有声明的变量名 AlignConsecutiveDeclarations: false # 连续宏时,进行对齐 -AlignConsecutiveMacros: true +AlignConsecutiveMacros: AcrossEmptyLinesAndComments # 左对齐逃脱换行(使用反斜杠换行)的反斜杠 AlignEscapedNewlines: Left # 水平对齐二元和三元表达式的操作数 AlignOperands: true # 对齐连续的尾随的注释 AlignTrailingComments: true +# 允许将所有参数放在下一行 +AllowAllArgumentsOnNextLine: true # 允许函数声明的所有参数在放在下一行 -AllowAllParametersOfDeclarationOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: true # 允许短的块放在同一行 -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Empty # 允许短的case标签放在同一行 AllowShortCaseLabelsOnASingleLine: false # 允许短的函数放在同一行: None, InlineOnly(定义在类中), Empty(空函数), Inline(定义在类中,空函数), All AllowShortFunctionsOnASingleLine: None # 允许短的if语句保持在同一行 -AllowShortIfStatementsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: Never # 允许短的循环保持在同一行 AllowShortLoopsOnASingleLine: false # 总是在定义返回类型后换行(deprecated)