【问题标题】:No `-line-filter` equivalent in clang-tidy config?clang-tidy 配置中没有等效的`-line-filter`?
【发布时间】:2020-11-27 18:13:28
【问题描述】:

我想在.clang-tidy 文件中配置我的-line-filter= 参数,而不是在生成命令的cmake 源文件中。向文件添加LineFilter 密钥只会让我收到“未知密钥”错误。配置文件真的不支持吗?有其他选择吗?

【问题讨论】:

    标签: clang-tidy


    【解决方案1】:

    不幸的是,这不受支持,请参阅ClangTidyOptions.h的来源

    /// Global options. These options are neither stored nor read from
     /// configuration files.
     struct ClangTidyGlobalOptions {
       /// Output warnings from certain line ranges of certain files only.
       /// If empty, no warnings will be filtered.
       std::vector<FileFilter> LineFilter;
     };
    

    【讨论】:

      猜你喜欢
      • 2018-03-10
      • 2019-04-01
      • 1970-01-01
      • 2020-12-30
      • 2019-03-13
      • 2021-06-02
      • 1970-01-01
      • 2020-07-14
      • 2019-09-27
      相关资源
      最近更新 更多