From c704a3794ce2ae69e5a1f254a396deb8b04dbf88 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Jul 2026 18:35:00 +0000 Subject: [PATCH] Fix linguist attribute so HTML test fixtures are excluded from language stats The previous pattern `test/* linguist-language=PHP` never matched the ~30MB of HTML fixtures because `*` in .gitattributes does not cross directory boundaries, so files like test/test-pages/lwn-1/source.html were still counted as HTML, making GitHub report the repo as ~99% HTML. Replace it with `/test/** linguist-vendored`, which matches the whole test tree at any depth and removes it from language statistics entirely, so the language bar reflects the actual library code in src/. Composer dist installs were already unaffected: `/test/ export-ignore` (present since PR #9 and included in the v4.0.0 release) keeps the test directory out of the archives GitHub generates for Composer. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01PwAk1TWbeydKTSWRfj7FGb --- .gitattributes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index aa9a622..9f049d5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,5 +5,7 @@ /docker export-ignore /docker-compose.yml export-ignore -test/* linguist-language=PHP +# Exclude test files from GitHub's language statistics (** needed to match +# nested files like test/test-pages/*/source.html, * stops at directories) +/test/** linguist-vendored * text=auto eol=lf \ No newline at end of file