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

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 07:24:13 PST 2020


sammccall added a comment.

I get the motivation for wanting to have a good, accessible way to do this thing that is possible today, but at the same time... I'm not sure we should pave this cow path, or even keep it.

Clang-tidy's configuration system is *really* complicated, and I don't think the complexity justified by the value it brings.
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.

As you're aware Nathan but others aren't - this ability to request config for other files was a significant source of difficulty in D91029 <https://reviews.llvm.org/D91029> - i.e. complexity of embedding clang-tidy.
Other features like inheritance, local vs global names, check option value priority, ConfigFileHandlers etc have contributed to a really complex model and greatly hinder the prospect of replacing ClangTidyOptionsProvider with something simpler, which is sorely needed IMO.


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