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

Dmitry Polukhin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 28 03:29:15 PDT 2020


DmitryPolukhin added a comment.

I think this diff looks very close to what we need. I hope it will be the last iteration.

Please also update title and description with the new name of the option, etc.



================
Comment at: clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp:2
+// REQUIRES: shell
+// RUN: clang-tidy --config-file=%S/Inputs/config-file/config-file %T/read-file-config/test.cpp | grep "warning: .*\[hicpp-uppercase-literal-suffix\]$"
+
----------------
Please use `FileCheck` as all other tests do instead of `grep` to make test more portable. Also with `FileCheck`  it should be no need in `REQUIRES: shell`.

And I think it is better to use `-dump-config` instead of checking specific check on a source file. This way you will tests only functionality that you implemented, without dependency some check behavior. Also it could be just another tests case in clang-tidy/infrastructure/config-files.cpp.


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

https://reviews.llvm.org/D89936



More information about the cfe-commits mailing list