From: Remi Gacogne Date: Tue, 3 Oct 2023 13:46:24 +0000 (+0200) Subject: clang-tidy-diff.py: clang-tidy only supports filename in filter-line, not paths X-Git-Tag: rec-5.0.0-alpha2~19^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae3b2b09b2374c64197a86fc4812993ad2ffd9ed;p=thirdparty%2Fpdns.git clang-tidy-diff.py: clang-tidy only supports filename in filter-line, not paths --- diff --git a/.github/scripts/clang-tidy-diff.py b/.github/scripts/clang-tidy-diff.py index 396a201b66..1d93fd226c 100755 --- a/.github/scripts/clang-tidy-diff.py +++ b/.github/scripts/clang-tidy-diff.py @@ -36,6 +36,8 @@ import tempfile import threading import traceback +from pathlib import Path + try: import yaml except ImportError: @@ -242,7 +244,8 @@ def main(): for name in lines_by_file: line_filter_json = json.dumps( - [{"name": name, "lines": lines_by_file[name]}], + # clang-tidy only supports filenames in -line-filter, not paths + [{"name": Path(name).name, "lines": lines_by_file[name]}], separators=(',', ':')) # Run clang-tidy on files containing changes.