mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 21:12:57 -05:00
main's test-lint changes rewrote the same functions as this branch
(module_parent, never_run, cfgs_over, reads_source_hits, names_rect).
The resolution keeps this branch's module routing (Gates, #[path]
overrides, base comparison) and takes from main: the 64-level bound in
weak_predicate, `&` before a lookup as a derived value, skipping later
attributes such as #[test_case(1; "one")] when finding a cfg's item,
and leaving out the lines of a cfg that holds on every CI target.
The review fixes for the same functions are part of the resolution:
- reads-source classifies by the final path step, so a final
.with_extension("json") is not a .rs read and .with_extension(ext)
is an unknown file.
- fixture-only reads a closure parameter as a new binding inside the
closure body.
- cfg argument lists split on commas outside string literals, in
cfg(any/all), cfg_attr predicates and cfg_attr paths.
- tests/<dir>/mod.rs takes its gates from the target roots beside it
that declare it, so a helper that only a macOS-gated mod declaration
loads is reported.
- a file loaded through #[path] declares its modules in its own
directory (impl/platform.rs loads impl/child.rs), and a change to it
reaches those files.
- a #[cfg_attr(<cond>, path = "...")] on an inline module is a
conditional route, with the default directory where the condition
does not hold.
- exact-pixel does not report a rect passed to a call
(count_items(button_rect)).
- each file's cfg attributes are read once instead of once per test.