Expand description
Packaging rule — foundation (issue #70).
README “Packaging”: test files never ship in the built artifact. Colocated unit tests live next to the source, so packaging has to strip them — and this rule confirms it did, by inspecting the built artifact rather than the working tree.
This module is the deterministic core: given the root of an unpacked built
artifact and the test-file globs that must not appear in it, scan walks
the tree and returns every offending file. Producing the artifact (building a
wheel/sdist, npm pack, cargo package, then unpacking it) is a per-language
layer on top — kept separate, and out of this foundation slice, so the core
guarantee is testable without any language toolchain. The per-language slices
supply the build step and the glob set: Python *_test.py (#72), TypeScript
*.test.* (#73), Rust tests/ (#74).
Functions§
- scan
- Walk
root— the root of an unpacked built artifact — and return every file whose name matches one ofglobs, sorted for deterministic output.