[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 4 05:39:15 PST 2020


alexfh requested changes to this revision.
alexfh added a comment.
This revision now requires changes to proceed.

Internally we have something similar, but with unconditional inheritance and a way to include other configs. I was thinking about implementing this in the FileOptionsProvider, but decided that this would be an overkill for most real projects. Overall the patch looks good to me, but please update the documentation and add a test to ensure that check options get merged correctly.



================
Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.h:111
+  /// Config flag for FileOptionsProvider to also include config from parent
+  /// dir.
+  llvm::Optional<bool> InheritParentConfig;
----------------
I'd rephrase this a bit: "Only used in the `FileOptionsProvider`. If `true`, `FileOptionsProvider` will take a configuration file in the parent directory (if any exists) and apply this config file on top of the parent one. If `false`, only this configuration file will be used."

Or something like this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75184





More information about the cfe-commits mailing list