这是我的Clang格式文件:
BasedOnStyle: Google
ColumnLimit: 110
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: true
IndentWidth: 4
AlignConsecutiveAssignments: true
SortIncludes: true
BinPackArguments: true
BinPackParameters: false
AlignAfterOpenBracket: false
BreakConstructorInitializers: AfterColon
AccessModifierOffset: -4
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowAllParametersOfDeclarationOnNextLine: true
格式化程序确实更喜欢在括号后中断函数调用:
if (csacalc::StudyUtility::findStudyPropertyIfExists(
m_metadata.studyProperties(), property.name(), studyProp))
我希望它适合行时在函数名称的行上保留一个参数:
if (csacalc::StudyUtility::findStudyPropertyIfExists(m_metadata.studyProperties(),
property.name(), studyProp))
有办法吗?