如何禁用clang-format自动添加命名空间闭合注释?
关闭clang-format命名空间闭合处自动添加注释的方法
你只需在现有配置中添加一行NamespaceComment: false,即可关闭命名空间闭合处自动添加注释的功能。
修改后的完整配置如下:
BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 2, TabWidth: 2, BreakBeforeBraces: Attach, AllowShortIfStatementsOnASingleLine: true, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -2, NamespaceComment: false
该选项会禁用clang-format在命名空间结束的花括号后自动追加// namespace XXX注释的行为,完全匹配你的需求。
内容的提问来源于stack exchange,提问作者Rodrigo
相关产品推荐
相关产品推荐

