Repository navigation
aperture: exclude vendored code under every common spelling (#4545) - #4573
Merged
Merged
Conversation
Vendored copies of other projects stay EXCLUDED (the existing treatment of vendor/ and third_party/), now also for: - by name (IGNORED_DIRECTORIES): third-party, thirdparty, 3rdparty, 3rd_party, 3rd-party, vendored; by suffix: *.framework bundles; - on evidence (VendorDirectoryDetector): libraries/libs/deps/extern(al) when at least half their non-empty subdirectories carry a license of their own that differs from the scan root's; versioned dirs (SDL2-2.32.10/) carrying one. No root license, no evidence. The scan root is never a candidate. The GuideStar doc walk and the chronometer fallback walk prune the same way. Doom study, coding LOC before -> after: gzdoom 931,079 -> 415,988 (libraries/, src/common/thirdparty/), doomretro 177,679 -> 137,805 (SDL2*-x.y.z/, xcode/*.framework), woof 142,932 -> 110,355 (third-party/); linuxdoom-1.10/ and the other 11 repos unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017BVJCCUMdjLJq1TAM3V34V
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017BVJCCUMdjLJq1TAM3V34V
Contributor
squid-protocol
marked this pull request as ready for review
October 6, 2026 15:08
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4545
Decision: exclude, not flag
Vendored copies of other projects are excluded from the scan, the same treatment
vendor/andthird_party/always had viaIGNORED_DIRECTORIES, so every first-party metric reads first-party code only. Documented indocs/wiki/02-03-aperture-filter.md("Vendored code") and beside the config entries.IGNORED_DIRECTORIES):third-party,thirdparty,3rdparty,3rd_party,3rd-party,vendored. By suffix:*.framework.aperture.VendorDirectoryDetector, cached per dir): a generic name counts only when it holds a separate project, meaning a license file of its own whose text differs from the scan root's license. If the root has no license, there is no evidence.libraries/ libs/ deps/ extern/ external/ externals/: excluded whole when at least half of its non-empty subdirs carry such a license;SDL2-2.32.10/): excluded when it carries one itself.linuxdoom-1.10/(license at root) stays.Real-scan proof (doom-study, all 14 repos, origin/main 95d6b27 vs branch)
Newly excluded files, all genuinely vendored and all under these trees:
libraries/(1,544 files: ZMusic incl. itsthirdparty/, ZVulkan, ZWidget, asmjit, bzip2, cppdap, discordrpc, lzma, miniz, range_map, webp) andsrc/common/thirdparty/+src/common/audio/sound/thirdparty/(109 + 3).SDL2-2.32.10/(94),SDL2_mixer-2.8.2/(16),xcode/SDL2{,_image,_mixer}.framework/(202).third-party/(23: base64, libebur128, md5, minimp3, miniz, pffft, sha1, spng, yyjson).No files were newly admitted anywhere.
Not covered (documented; use
exclude_dirs)libraries/(21k LOC): onlyfmthas a license that differs from the root's.minilzo's GPL COPYING matches the root's, and most subdirs are empty submodules, so the container falls below the half threshold. Erring this way is deliberate.source/nlohmann/json.hpp, and bare root-level library dirs (zlib/,libpng/in eternity and zandronum).Gates
pr_gates.py: audits, secrets, xray, gauntlet, golden and suite pass. Lint passes after the PEP 604 fix.portswas skipped because there is no local cics-crucible checkout.ast_accuracy_auditshows no regressions.tests/core_engine/test_vendored_dirs_4545.py(21 tests: each pattern, plus first-party lookalikes:linuxdoom-1.10, Nxlibs/, a mostly first-party container,extern/glue, root never a candidate).🤖 Generated with Claude Code
https://claude.ai/code/session_017BVJCCUMdjLJq1TAM3V34V