我正在尝试配置 uncrustify (源代码美化器)以避免在先前的左括号下方对齐。例如,我希望代码看起来像这样(来自 file
indent_paren.c
):
void f(void)
{
while (one &&
two)
{
continue;
}
}
当我在上面的代码上运行 uncrustify 时,该行two)
缩进以与上面的行对齐(
:
void f(void)
{
while (one &&
two)
{
continue;
}
}
我正在使用从源代码编译的最新版本的 uncrustify (0.59),该测试的配置设置如下(在文件中indent_paren.cfg
):
indent_with_tabs = 0
indent_columns = 4
indent_paren_nl = false
indent_bool_paren = false
我调用 uncrustify 如下:
uncrustify -c indent_paren.cfg indent_paren.c
我发现版本 0.56(从 Ubuntu 11.04 的存储库安装)具有相同的行为。我使用了错误的配置设置,还是这里有其他问题?谢谢你的帮助。