【发布时间】:2020-07-12 15:47:49
【问题描述】:
快速提问:
我有一些code 看起来像:
if (interactive)
ret = main_interactive(ctx, debug, use_aio);
else
ret = main_server(ctx, debug);
/*
* In case we got here through an error in the main thread make sure all
* the worker threads are signaled to shutdown.
*/
当我通过 clang-format 7.0.1-8 (debian) 运行它时(使用这个 .clang-format 文件),我得到 this:
if (interactive)
ret = main_interactive(ctx, debug, use_aio);
else
ret = main_server(ctx, debug);
/*
* In case we got here through an error in the main thread make sure all
* the worker threads are signaled to shutdown.
*/
可以看到注释块的第一行缩进不正确。
有什么建议吗?
【问题讨论】:
-
我无法重现您的错误。如果您使用不同的系统和配置文件,您不太可能会看到此问题。
-
我能够使用相同的配置文件在不同的系统上重现它。我不仅使用了 sn-p,还使用了整个文件,以防文件顶部的某些内容混淆了 clang-format。
标签: clang-format