我正在创建一条规则,在为函数,枚举结构等添加大括号之前总是添加一个新行。但是它具有相反的效果,即更改所有代码以使大括号保持在同一行。
预期行为:
typedef enum
{
DATA = (1 << 0),
STATUS = (1 << 1),
VALUE = (1 << 2),
} TESTER;
观察行为
typedef enum {
DATA = (1 << 0),
STATUS = (1 << 1),
VALUE = (1 << 2),
} TESTER;
Clang格式文件:
IndentWidth: 4
TabWidth: 4
UseTab: Never
AllowShortIfStatementsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
IndentCaseLabels: false
AllowAllParametersOfDeclarationOnNextLine: true
ColumnLimit: 80
BreakBeforeBraces: Custom
BraceWrapping:
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterStruct: true
AfterUnion: true
BeforeElse: false
IndentBraces: false