[PATCH] D89936: [clang-tidy] adding "--config-file=<file-path>" to specify custom config file.

Dmitry Polukhin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 04:52:58 PDT 2020


DmitryPolukhin added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:320-324
+    if (!Checks.empty()) {
+      llvm::errs() << "Error: --config-file and --checks are mutually "
+                      "exclusive. Specify only one.\n";
+      return nullptr;
+    }
----------------
Hiralo wrote:
> DmitryPolukhin wrote:
> > DmitryPolukhin wrote:
> > > njames93 wrote:
> > > > I disagree with this check here, `Config` is not mutually exclusive with `Checks`, `Checks` gets applied atop of `Config`. So the same should happen when using `ConfigFile` with `Checks`
> > > +1
> > Clarify: +1 to @njames93 that we don't need this check.
> > I disagree with this check here, `Config` is not mutually exclusive with `Checks`, `Checks` gets applied atop of `Config`. So the same should happen when using `ConfigFile` with `Checks`
> 
> ok, will remove these two checks :)
I think we need to keep the first check. There is no reason to specify both `--config` and `--config-file` or give on of them precedence.


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

https://reviews.llvm.org/D89936



More information about the cfe-commits mailing list