Some paths can have special chars like file++c.cpp in this case the regex will fail if we don't escape it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Based on https://bugs.llvm.org/show_bug.cgi?id=46536 I've reverted this as it renders the core feature of the script as unusable (using .* to run over entire database)
@njames93 wdyt if we add another parameter to distinguish if we want to use regex or not, and if not we escape the paths?
Also thank you so much for catching this up!
As the argument is documented as being a regex string, we shouldn't really try to escape it, and users should be expected escape any file names themselves before invoking the script.
If for whatever reason you want to use .c++ as your file extension. then you should pass r'*\.c\+\+' to the script.
Can I ask what the specific use case you have that is causing the issue? Are you invoking run-clang-tidy from a script that generates the list of files to search for?
Thank you for the detailed reply! we are using this script in automation and some files from our repo indeed need to be escaped. I think it makes sense what you are saying to give to the consumer the files already escaped. I'm going to close this issue.