[PATCH] D120187: [clang-tidy] Allow newline characters as separators for checks in Clang-Tidy configurations

Danny Mösch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 19 13:11:26 PST 2022


SimplyDanny marked 2 inline comments as done.
SimplyDanny added inline comments.


================
Comment at: clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp:100
+  EXPECT_TRUE(!!Options);
+  EXPECT_EQ("-*,misc-*\nllvm-*\n-clang-*,\ngoogle-*\n", *Options->Checks);
+}
----------------
njames93 wrote:
> This seems like a shortcoming in llvms YAML parser. Isn't the fold character `>` supposed to replace newlines with spaces and strip trailing ws
> ```lang=c++
> "-*,misc-* llvm-* -clang-* google-*"
> ```
> Using the pipe `|` instead should yield the output you are currently expecting,
That's true. `>` should actually not work without a comma after each check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120187



More information about the cfe-commits mailing list