[PATCH] D92175: [clang-tidy] Add support for loading configs for specific files.

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 08:32:18 PST 2020


njames93 added a comment.

In D92175#2418651 <https://reviews.llvm.org/D92175#2418651>, @sammccall wrote:

> Currently AFAICS there's just *one* check that ever reads the config for other files, and it could be redesigned not to do so - by conservatively renaming only identifiers declared in the current file.

You've missed the point behind this. The purpose for this functionality is clang-tidy (usually) only gets ran on implementation files, This makes it hard to enforce specific checks on header files.
You're best bet is hoping that all the header files you include are using the same .clang-tidy config. 
This gets even more challenging when using the run_clang_tidy script over a compilation database. If there isn't one single project wide configuration, You'll likely get conflicting errors and fixes.
Also there is only *one* check at the moment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92175/new/

https://reviews.llvm.org/D92175



More information about the cfe-commits mailing list