[clang] [clang-format] Add -r option for recursing into directories (PR #160299)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 1 04:19:59 PDT 2025


mydeveloperday wrote:


> Thanks for the comments. It may be a while, but I'll try and look for a smarter alternative (I do agree that a glob pattern would be nicer from a user's perspective).

Take a look here
https://llvm.org/doxygen/classllvm_1_1GlobPattern.html

> *[/\\]foo.{c,cpp} will match (unix or windows) paths to files named foo.c or foo.cpp.

I've no idea if its any good but it might help... I think if we can have a solution that is more than just -r then I would feel more comfortable like @HazardyKnusperkeks  it might just be more acceptable especially as tools like prettier support this, it kind of gives us a precident.  (see https://globster.xyz/) for examples

https://github.com/llvm/llvm-project/pull/160299


More information about the cfe-commits mailing list