[PATCH] D147876: [clang-tidy] Support specifying checks as a list in the config file
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 10 04:24:07 PDT 2023
carlosgalvezp marked an inline comment as done.
carlosgalvezp added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:129-141
+ // Special case for reading from YAML
+ // Must support reading from both a string or a list
+ Input &I = reinterpret_cast<Input &>(IO);
+ if (isa<ScalarNode>(I.getCurrentNode()) ||
+ isa<BlockScalarNode>(I.getCurrentNode())) {
+ Checks.AsString = std::string();
+ yamlize(IO, *Checks.AsString, true, Ctx);
----------------
njames93 wrote:
> All this code can just be inlined into the function below and this function can just be removed
Can you elaborate on how to do it? I cannot call `mapOptional("Checks"` twice, one for string and one for vector, since it will print an error message on either case.
The function `yamlize` does not exp
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147876/new/
https://reviews.llvm.org/D147876
More information about the cfe-commits
mailing list