[clang-tools-extra] [run-clang-tidy.py] Add -directory-filter option to run-clang-tidy.py (PR #89302)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 07:37:27 PDT 2024


================
@@ -307,6 +307,14 @@ def main():
         "source files from compilation database to output "
         "diagnostics from.",
     )
+    parser.add_argument(
+        "-directory-filter",
----------------
PiotrZSL wrote:

this basically work opposite to -source-filter, specially because it work on full path, not just on directory path.
Therefore I could filter out with this an file also, not only directory.

For me this option is just an negative source-filter, and as you can do negative regexp in python, i do not see a reason for it.

Specially that for what this option describes there is already this:
```
    parser.add_argument(
        "files", nargs="*", default=[".*"], help="files to be processed (regex on path)"
    )
```

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


More information about the cfe-commits mailing list