Skip to content

Commit 63ebd75

Browse files
tapclaude
andcommitted
clang-tidy: scope the header filter to the object's own headers
The previous -header-filter='.*/source/projects/.*' also matched the bundled CPython headers: the build includes them via a path that passes back through source/projects (…/tap.python_tilde/../../../support/include/python3.13/…), so the filter linted all of CPython and failed on its naming. (This slipped past local checks because Ubuntu's clang-tidy canonicalizes the include path, hiding the source/projects segment; the macOS CI clang-tidy keeps the literal path.) Narrow the filter to '.*/tap\.python_tilde/tap\.python_tilde.*', which matches only this object's own tap.python_tilde_*.h headers and excludes both the CPython support tree and min-api. Verified against the exact CI path strings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MRTDgYKY38WH8Bqz17W9k1
1 parent 74d2811 commit 63ebd75

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/style.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,13 @@ jobs:
4646
tidy="$(brew --prefix llvm@18)/bin/clang-tidy"
4747
files=$(python3 -c "import json; print('\n'.join(e['file'] for e in json.load(open('build/compile_commands.json')) if '/source/projects/' in e['file']))")
4848
fail=0
49+
# Scope diagnostics to this object's OWN headers. A broad
50+
# '.*/source/projects/.*' also matches the bundled CPython headers,
51+
# which the build includes via a relative path that passes back
52+
# through source/projects (…/tap.python_tilde/../../../support/…),
53+
# flooding the run with CPython naming violations.
4954
for f in $files; do
50-
out=$("$tidy" -p build -header-filter='.*/source/projects/.*' --warnings-as-errors='readability-*' "$f" 2>/dev/null || true)
55+
out=$("$tidy" -p build -header-filter='.*/tap\.python_tilde/tap\.python_tilde.*' --warnings-as-errors='readability-*' "$f" 2>/dev/null || true)
5156
if echo "$out" | grep -qE "warning:|error:"; then echo "$out"; fail=1; fi
5257
done
5358
[ "$fail" -eq 0 ] && echo "clang-tidy clean." || { echo "::error::clang-tidy found violations"; exit 1; }

0 commit comments

Comments
 (0)