Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No `-line-filter` equivalent in clang-tidy config?

Tags:

clang-tidy

I want to configure my -line-filter= arguments in the .clang-tidy file instead of in a cmake source file where the command is generated. Adding a LineFilter key to the file only gets me a "unknown key" error. Is this really not supported via the config file? Is there an alternative option?

like image 879
renefritze Avatar asked Aug 07 '20 11:08

renefritze


1 Answers

Unfortunately this is not supported, see source of 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;
 };
like image 190
pablo285 Avatar answered Nov 13 '22 06:11

pablo285