Some paths can have special chars like file++c.cpp in this case the regex will fail if we don't escape it.
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.