Commit Graph
217 Commits
Author SHA1 Message Date
dotCooCoo 5594da577b xtask: test-lint census rule ends tail assignments at their block and tells closure locals from captures
An assignment that ends a block without a semicolon (`{ input = c }`) now
makes its alias at the block's close instead of after the next statement.

A `let` inside a move closure, or one of its parameters, now counts as a
local binding: an assignment to it ends the alias as it does outside a
closure. Assignments to outer captures are still skipped.

A closure stored with `let` in `Some`, `Ok`, `Err`, `Box::new`, `Rc::new`
or `Arc::new` and never used again does not run, so its assignments no
longer end an alias. A closure passed to any other call may run and still
ends it.

An async closure called where it is written now runs when the call is
passed straight to `block_on` (a trailing comma included), unless the
`block_on` sits inside another closure.
2026-12-02 08:17:39 -08:00
dotCooCoo 806aec918a xtask: test-lint census rule counts a computation only where it runs on the entry
The census rule leaves out a loop that feeds each entry into a
computation. It now checks that the computation runs, and that it runs
on the entry:

- An alias assigned another value no longer holds the entry, and one
  assigned the entry holds it. Assignments in an empty loop, an async
  block, a move closure or a closure the loop never calls do not change
  the alias, and one that may be skipped does not make one.
- A nested for body counts only when its source is a literal range or
  array that is not empty.
- A block in an earlier argument keeps the enclosing || or && that can
  skip the call.
- Calling an async closure counts only when the future is awaited or
  passed to block_on.
- A closure that is not bound with let counts only when it is called
  where it is written; a parenthesized initializer binds the closure.
- A closure call resolves to the binding in scope at the call, so a
  later let of the same name takes it.
- A conjunction inside a parenthesized operand of an asserted && is
  required, unless an || at its level can bypass it.
2026-12-02 07:11:24 -08:00
dotCooCoo cf51c8894c xtask: test-lint decodes string continuations in cfg_attr paths and keeps census hits for fixed ranges
A path string that continues on the next line with a backslash now
decodes to the joined file name, so the conditional route is kept.
A range argument with two fixed bounds (1..4, 1..=4) no longer counts
as an input, so the round-trip census diagnostic stays; a range with a
variable bound still suppresses it. Adds a test for a bracket in a
cfg_attr path filename keeping its sibling cfg gate.
2026-12-02 05:55:33 -08:00
dotCooCoo 1361bb3b5c Merge main into fix/census-behavior-tables 2026-12-02 05:23:02 -08:00
dotCooCoo 1eb22f6134 xtask: test-lint census entry reads skip path segments, comment gaps and block statements
- An entry name after `::` (`defaults::c`) is a path segment, not a read of the loop binding.
- A `let` initializer scans to the end of its statement, so a block initializer binds its tail
  (`{ prepare(); c }`) and not the earlier statements in the block; `if let` and `while let`
  end at their block.
- A call keeps its name when masked comment whitespace sits before `(`, except after a keyword
  (`if (a)`).
- The argument-guard and alias tests now depend on the logic they cover.
2026-12-02 03:01:11 -08:00
.CooCoo 9a7ebdd8a2 Merge pull request #10549 from dotCooCoo/fix/test-lint-plain-path-decode
xtask: test-lint decodes escapes in #[path] values
2026-12-02 02:15:50 -08:00
dotCooCoo 859a6b4dd3 xtask: test-lint decodes escapes in #[path] values
A plain #[path = "\x63hild.rs"] after #[cfg_attr(windows, path = "child.rs")]
loads child.rs on Linux and FreeBSD, but test-lint compared the undecoded
spelling with the file name, dropped that route and reported a test in
child.rs as never-run. The plain attribute and the path argument of
cfg_attr now decode the escapes of an ordinary string literal with the
same unescape the cfg values use. Raw string literals are read as written.
2026-12-02 01:33:38 -08:00
dotCooCoo b65de1d729 Merge main into chore/never-run-test-allows 2026-12-02 01:21:47 -08:00
dotCooCoo 35afebf9dd Merge main into fix/census-behavior-tables 2026-12-02 00:27:33 -08:00
dotCooCoo da8e9cc197 xtask: test-lint census leaves out loops that run each entry through a computation
A loop over a whole table whose body passes the entry to a call together
with other state (a command run, a file written, a render, a parse of
other input) checks behavior for each entry, so the census rule no
longer reports it. A lookup, a call on the entry alone, literal
arguments and calls in a failure message still count as a census.

The call counts only where it runs whenever the loop's assertions pass:
not after an `||`, not on the right of an `&&` whose result is not
asserted, not inside an `if`, `else`, `match` arm, `while` or async
body, and not inside a closure the loop never calls. A name counts as
the entry from the `let` that binds it from the entry to the end of its
block, and not where a nested loop, a closure parameter or another
`let` rebinds it or where it names a field. An asserting helper keeps a
loop out of the census only where it runs the same way, and a round trip
can read the entry as its receiver (`k.parse()`).
2026-12-02 00:03:36 -08:00
.CooCoo ed6619523c Merge pull request #10504 from dotCooCoo/fix/toolbar-chips-one-line
Tools: Color, Gradient and None share one line in a one-column rail
2026-12-01 22:45:13 -08:00
dotCooCoo 8b8e246713 xtask: test-lint keeps the route, suffix and census refinements main lacks
- never-run: in changed mode, a file that a crate target loaded at the
  base and no target loads now counts as compiled out, so removing the
  last `mod` or `#[path]` declaration on the way to it, or deleting the
  only target root that loads it, fails the check for its tests.
- reads-source: an `ends_with(".rs")` check counts only when it picks
  entries from a file listing (an iterator filter or a `for` loop over
  one), or when the function around it reads a file or calls a function
  in the file that does. A suffix check on a generated name in a test
  that reads nothing is not reported.
- census: a helper on the left of an `||` hides the whole-table check on
  the right only when it always runs: not behind an `&&`, and not inside
  one arm of an `if` or `match`.
- docs: unchanged-line `never-run` hits fail the command when the change
  takes away a test's last CI route.
2026-12-01 22:45:04 -08:00
.CooCoo 2f68b49692 Merge pull request #10534 from dotCooCoo/fix/test-lint-platform-only-tests
xtask: test-lint never-run lists tests that build on macOS or Windows without failing
2026-12-01 22:31:34 -08:00
dotCooCoo e727c01c13 Merge main into fix/test-lint-sleep-polls
main replaced the hit's per-file `also` ranges with `gates`, a list of
lines in the hit's own file. The sleep rule's loop and spawn spans now
add their lines to `gates`. The `last_literal` and `path_literal`
helpers that main replaced are left out.
2026-12-01 21:41:44 -08:00
dotCooCoo 906aa83b6c Merge main into fix/test-lint-platform-only-tests
main replaced Hit's `also` lines with `gates`; the merge keeps `gates`
and adds `report_only` beside it.
2026-12-01 21:41:39 -08:00
dotCooCoo c6c7de257f Dependencies: move the craft-libs pin to craft-libs main 77ade517
craft-libs #4659 (swatch chips that fit a one-column rail) and #4723
have merged, so every craft-libs rev moves from #4659's head edbf2117
to craft-libs main at 77ade517. The egui revisions move to 861d60a6,
the ones that craft-libs rev pins; winit stays at 0dfcec0e. Cargo.lock
changes only the sources of those packages.
2026-12-01 20:14:00 -08:00
dotCooCoo d1c255fa64 xtask: test-lint never-run lists tests that build on macOS or Windows without failing
never-run failed the check on tests of macOS- or Windows-only code, such
as the touchpad gesture tests in quickpenwheel.rs and the Windows
performance counter tests in vectorcraft-cli's perf.rs. CI cannot build
them on Linux, and they run locally on their platform.

A never-run hit on a test that still builds on macOS (aarch64 or x86_64)
or Windows (x86_64 or aarch64) is now listed with the report-only rules,
and its note says which platform to run it on. A test that no desktop
target builds, such as one gated on target_os = "ios" or
all(windows, unix), still fails the check.
2026-12-01 19:54:14 -08:00
dotCooCoo 40cd9932eb xtask: test-lint sleep rule checks the spawn call, std imports and counted loops
- A spawned sleep is exempt only when the closure is the direct argument
  of `spawn`, not of a call inside it such as `spawn(prepare(|| …))`.
- A bare `spawn` or `sleep`, and a `thread::` path, count only where a
  `use` brings them in from `std::thread`; `crate::thread::spawn` and
  `std::thread::{self as worker}` do not.
- A sleep hit inside a spawned closure spans through the end of the
  spawn statement, so an edit that adds `.join()` there counts as a
  change. The brace-less `spawn(|| thread::sleep(D))` form gets the
  same span.
- A block operand after a spaced `<` or `>` stays in the loop condition.
- `while n < bound` with `n = n + 1` or `n = n - 1` in the body is a
  counted loop, like `n += 1`.
- Calls inside the arguments of `println!`, `eprintln!` and the log
  macros are not polling work.
2026-12-01 18:25:30 -08:00
dotCooCoo c1b9fb98c3 Merge main into fix/test-lint-mirror-false-alarms 2026-12-01 18:24:34 -08:00
dotCooCoo 280ea946e5 Merge main into fix/test-lint-sleep-polls 2026-12-01 17:52:24 -08:00
dotCooCoo 8f66d6ce50 xtask: test-lint sleep rule reads counted loops, aliases and nested blocks
- A `while n < bound` loop that adds to or subtracts from `n` in its body
  counts its own passes, so calls in the bound (`attempts.len()`) no
  longer exempt the sleep. A condition that also has `&&` or `||` keeps
  its calls as polling evidence.
- A change to the loop or spawn closure around a reported sleep counts as
  a change to the hit, so an edit that removes the poll from the
  condition fails the changed-line check.
- `use std::thread::spawn as spawn_thread;` and
  `use std::thread::sleep as nap;` no longer bring in the bare names, and
  `thread::sleep_ms` no longer matches `thread::sleep`.
- A `thread::spawn` path counts only where a `use` binds `thread` to
  `std::thread`, so a local `mod thread` with its own `spawn` is not
  exempt.
- A `;` inside a nested block in a loop condition
  (`while !ready({ let key = 1; key })`) no longer ends the header, and a
  block after `||` stays part of the condition.
- A sleep in a `let` initializer block inside a dropped spawn closure is
  exempt like the closure's other sleeps; the same block inside a polling
  loop is still reported.
2026-12-01 17:52:24 -08:00
dotCooCoo f91fe5bf54 xtask: test-lint sleep rule checks thread spawns and real polling calls
- A dropped-handle spawn counts only as `thread::spawn` through a path,
  with or without a leading `::`, or as a bare `spawn` that a `use` brings
  in. A local `fn spawn` that runs the closure at once is reported.
- A sleep that is the whole body of a closure without braces is judged by
  the call that takes the closure: a dropped `thread::spawn` is exempt, and
  a joined one is reported even inside a polling loop.
- A `loop` used as a `let` value is checked for polling calls.
- Calls inside the sleep's own argument and inside `stringify!` are not
  polling work, and neither are `unwrap`, `expect` and the `unwrap_or`
  family.
- `Duration::new` is matched per call, with `Duration` as a whole path
  segment, so a local named `new` or `ScheduleDuration::new()` does not
  change the result.
2026-12-01 17:10:02 -08:00
dotCooCoo e19e96f810 xtask: test-lint reads base roots, module scopes and whole literals
- Changed mode builds the base's target-root routes from the base tree,
  so a deleted tests/<root>.rs still counts as loading tests/common/mod.rs.
- A base test is matched by its name, its inline modules and its place
  among same-named tests in them, so removing `mod a` does not let
  `a::t` hide a newly off `b::t`.
- reads-source looks through grouping around the read path and names a
  file only from a complete literal, a format!/concat! call or
  Path::new/PathBuf::from; `"data.json".trim_end_matches(".rs")` no
  longer counts as a .rs file.
- mirror keys keep a raw literal whole up to its own delimiter, and a
  key must be one complete string literal.
- for, if let, while let, let and match patterns keep word boundaries
  (`mut n` binds `n`), and a struct pattern's braces are not taken as
  the loop or if-let body.
- #[path] and cfg_attr path values accept raw string literals.
2026-12-01 17:06:07 -08:00
dotCooCoo a7654fc638 xtask: test-lint matches base tests by place and keeps route kinds apart
- never-run in changed mode lints the file as it was at the base and
  matches a test by its name and its place among tests of that name, so
  a test that was already off is not counted again when lines move.
- A file reached by name inherits only the gates of named declarations,
  and one reached through #[path] only those of #[path] declarations.
- The changed-file walk also reads the base child declarations of a
  #[path]-loaded file, so a removed `mod child;` still reaches the child.
- reads-source classifies the outer path step, not a join nested in its
  argument.
- mirror treats complete raw string literals as keys.
- A raw cfg value keeps the quotes inside it (r#""unix""# is not unix).
- census keeps word boundaries, so `k as usize` reads `k` and the local
  `kasusize` does not.
- fixture-only finds a for loop's `in` across line breaks.
2026-12-01 16:17:26 -08:00
dotCooCoo 6d0f17690a Merge main into fix/toolbar-chips-one-line 2026-12-01 15:39:11 -08:00
dotCooCoo 2157200131 Merge main into fix/new-document-spacing 2026-12-01 15:38:11 -08:00
dotCooCoo f5d227fe23 xtask: test-lint sleep rule reads labels, block conditions and closure return types
The poll check now:

- keeps a block condition (`while { r.load(SeqCst) } { ... }`) in the
  loop header, so the loop counts as a poll, while a `m! { ... }` macro
  before a loop still ends the statement before it;
- strips a loop label (`'outer: while ...`) before looking for the
  keyword;
- treats `move || -> () { ... }` as a spawned closure, like `move || {`;
- does not take `return ::std::thread::spawn(...);` as a dropped handle,
  since a keyword is not a path segment;
- does not count a nested `fn` item's name as a call in the loop.
2026-12-01 15:13:59 -08:00
dotCooCoo 234662bb4b Merge main into fix/test-lint-mirror-false-alarms
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.
2026-12-01 14:46:05 -08:00
dotCooCoo 184978b9a6 Tools: Color, Gradient and None share one line in a one-column rail
craft-libs #4609 measures the Fill and Stroke proxy at the width of its
column, so the proxy no longer widens a one-column Tools panel. The
column is then one rail button less one tight gap wide, and the three
swatch chips (a third of a rail button each, a tight gap apart) took
more than that: None wrapped onto a second line.

The craft-libs pin moves to storytold/craft-libs#4659, which sizes a
swatch chip so the three chips and their gaps fit the column. That rev
also carries #4609 and the other craft-libs changes merged up to
d73e274a. The one-column toolbar test now also checks that the chips
stay inside the column of tools and do not overlap, and a new test
checks the same at UI scale 2.
2026-12-01 14:44:03 -08:00
dotCooCoo 8662e69da8 xtask: test-lint sleep rule treats Duration::new as a clock call
A wait such as `while start.elapsed() < Duration::new(1, 0)` checks
only the clock, but the poll check counted its `new` call as a
condition and left the sleep unreported. `new` now counts as a time
call when every `new` in the loop is `Duration::new`, and the clock-only
wait cases include it.
2026-12-01 14:34:19 -08:00
dotCooCoo 009406a696 Merge main into fix/test-lint-sleep-polls 2026-12-01 14:09:10 -08:00
dotCooCoo 829a090cd8 xtask: test-lint sleep rule leaves out condition polls and fallback releases
The `sleep` rule reported every `thread::sleep` in test code, so 24 of the
30 hits across the workspace were the pause of a loop that waits for a
condition (a search's progress, a flag's `load`, a tool's `poll`) with a
long deadline, or a spawned thread that opens a gate after 10 s in case
the test never does. None of those make a test pass or fail on time.

The rule now leaves out:

- a sleep in a `while` or `loop` whose condition or body calls a function
  or method other than one that reads or converts a time, also when the
  sleep sits under an `if` or `match` inside that loop;
- a sleep in a closure passed to `spawn` when the call is a whole
  statement, so the test drops the thread's handle.

A loop that only waits for the clock (`elapsed`, `as_millis` and other
`Duration` reads), a counted loop, a `for` loop, a sleep under an `if`
outside a loop, and a spawned thread whose handle is kept, returned,
passed on or joined are still reported. Macros such as `println!` in a
loop do not count as a condition. The loop's head is read as a whole
statement, so braces inside it, as in `json!({})`, do not cut it short.

`cargo xtask test-lint --all` now lists 6 sleep hits instead of 30; each
of the 6 delays a gate or a poll that the test's result depends on.
2026-12-01 13:59:18 -08:00
dotCooCoo 55cba88a89 Merge main into fix/toolbar-chips-one-line 2026-12-01 13:58:56 -08:00
dotCooCoo 186e6db9ba xtask: test-lint reads renames, cfg_attr paths, casts and arm bindings
- changed mode diffs with --no-renames, so an exact rename lists the old
  path as deleted and the new path as added, and both seed the route walk.
- census reads a cast of the loop binding (k as usize) as the entry, and
  no longer reads a field or path segment named like it (config.k, m::k).
- reads-source takes the file name from the final .join(...) component;
  a final component that is not a literal is an unknown file.
- mirror keeps whitespace inside string literals when it compares lookup
  keys, so "A B" and "AB" are different entries.
- fixture-only resolves a name bound by a match arm's pattern to that arm,
  not to an outer let; a guard still reads the outer binding.
- never-run follows #[cfg_attr(<cond>, path = "...")] overrides: the
  selected path is loaded where the condition holds, and the default path
  elsewhere.
- never-run treats tests/<dir>/mod.rs as loaded by the test targets beside
  it, like a crate root.
- exact-pixel no longer reports two rects compared by their difference
  (a.width() - b.width()).
2026-12-01 13:34:08 -08:00
dotCooCoo 602d2142e4 Merge main into chore/test-lint-rules 2026-12-01 07:41:47 -08:00
dotCooCoo e1c1b04f25 xtask: test-lint follows deleted and detached routes and decoded cfg values
- A deleted file stays in the changed set and seeds the descendant walk,
  so a module it loaded through #[path] is checked for a lost CI route.
- A parent file that no crate target loads (its mod line removed) no
  longer counts as an ungated route to the module it declares.
- #[path] on an inline module sets the directory of the modules inside it.
- git grep lists #[path] parents with -z, so non-ASCII paths are read
  verbatim in both trees.
- cfg string values are compared decoded ("\x6cinux" is linux); raw
  strings stay as written.
- mirror reports arithmetic on either side of the equality, and ignores
  comments beside lookup keys.
- reads-source does not take a format! argument as the file name.
- The base never-run hits are computed once per file.
2026-12-01 07:27:46 -08:00
dotCooCoo eca4eae37d Merge main into fix/test-lint-mirror-false-alarms 2026-12-01 07:13:57 -08:00
dotCooCoo 3d2b663b9e xtask: test-lint never-run follows #[path] modules and multiline gates
never-run now finds the files that load a module through `#[path]`,
including a sibling such as `graphics.rs` loading `tests_graphics.rs`,
and follows them in both `--all` and changed-file mode. A changed file
now reaches every file it loads, directly or through other modules, so a
`cfg` added to its `mod` declaration flags the unchanged child's tests.

- Every route to a module counts: inline-module routes, `#[path]` routes
  and several routes from one file are joined, each with its own
  ancestors, and a crate root keeps its own route.
- A default `mod x;` matches only the file it really loads.
- Every line of a multiline `cfg` attribute counts as a gate line, for
  the test's own gates and for the parent declarations.
- The base comparison reads `#[path]` declarations from the base tree,
  so a moved declaration is not reported as newly off.
2026-12-01 06:52:18 -08:00
dotCooCoo 579fa0c247 xtask: test-lint mirror leaves out reads at two entries and shared arithmetic
- Two calls that differ only in the entry they name (a string or integer
  literal, a local, a field or an indexed element) relate two entries, as in
  at("B") == at("A") + 1 or bounds(&s, copy) == bounds(&s, id) + dv, and are
  no longer reported.
- The same arithmetic on both sides (rotate_deg(-270.0) * v ==
  rotate_deg(90.0) * v) checks that two inputs agree and is no longer
  reported.

On main, test-lint --all reports 1 mirror hit instead of 14.
2026-12-01 04:31:47 -08:00
dotCooCoo 4de23f0c95 Tests: census skips helper sources and negated rejection checks
A whole-table loop or .all(…) whose source calls an asserting helper
runs that helper for every entry, so census no longer reports it.
A negated is_ok() or is_some() checks a rejection and is no longer
counted as a presence check; !is_empty() still is.
2026-12-01 04:06:08 -08:00
dotCooCoo 408661218f Test lint: reads-source spans the path; cfg search skips later attributes
A reads-source hit now runs through the call's closing parenthesis, so
changing a path on a later line of a multiline call counts as a change
to the hit. The never-run cfg search skips whole attributes after the
cfg, so a `;` inside `#[test_case(1; "one")]` no longer drops the cfg.
2026-12-01 04:05:40 -08:00
dotCooCoo 44c8e34513 xtask: test-lint review fixes for spans, cfg_attr, shared roots and bindings
- A negated .contains(...) check forbids a value and is no longer
  treated as a presence check; !items.is_empty() still is.
- reads-source matches the last path literal of a read_to_string
  argument, and its span runs through the argument's closing paren.
- A for pattern binding shadows an outer let inside the loop body.
- Nested cfg_attr conditions are combined before the inner cfg applies.
- A never-run hit counts edits to the enclosing cfg lines and to the
  test, not to code between them.
- A parent declaration edit counts against a child's test only when
  the test still ran in CI at the base.
- A module loaded by several roots is off only when every root leaves
  it out.
- docs/development.md lists reads-source and never-run as failing rules.
2026-12-01 03:42:46 -08:00
dotCooCoo a75bcbde3d Merge main into chore/test-lint-census 2026-12-01 03:35:41 -08:00
dotCooCoo 6a34a994bb xtask: census skips loops with a break and rejections across &&
A break can end a whole-table loop before the last entry, and an unwrap_err() or expect_err() on the other side of an && always runs, so neither is a presence-only census.
2026-12-01 03:35:40 -08:00
dotCooCoo cefd2ed69e Tests: test-lint reads the path a join adds after a format call
read_to_string(PathBuf::from(format!("{}/fixtures.rs", root)).join("input.json"))
was reported as reading Rust source, and a join of "lib.rs" after a
format call was missed. path_literal now takes a literal after the
format call's closing parenthesis as the end of the path.
2026-12-01 03:32:16 -08:00
dotCooCoo 0b41498af6 Tests: test-lint reads format paths, nested mod declarations and call arguments exactly
- reads-source checks the format string of a format!(...) path, so a
  format argument ending in .rs is not taken for the file name.
- never-run combines only the mod declarations that load the same file;
  a declaration inside another inline module loads a file under that
  module's directory.
- exact-pixel treats a comma inside a call's arguments like the closing
  parenthesis, so f(rect.min.x, 3) is a coordinate passed on.
2026-12-01 03:06:35 -08:00
dotCooCoo 2c1278280b xtask: test-lint cfg_attr, #[path] and inline-module gates, changed parent declarations
- never-run reads cfg(...) nested in cfg_attr, and blanks comments in cfg predicates.
- A file's inherited gates come from the mod declaration that loads it: #[path] overrides
  are resolved, and a declaration inside an inline module gates the file under that
  module's directory. Several declarations of one file join with any(...).
- In changed-files mode, a change to a parent mod declaration or its cfg counts for the
  never-run hits of the files it loads, including files that did not change.
- Round trips reject arithmetic before the lookup (1 + lookup(k)).
- reads-source ignores Rust paths that occur only in comments.
- if let and while let bindings shadow outer bindings only inside their body.
- The mirror allow test now starts from an assertion that is reported.
2026-12-01 02:55:37 -08:00
dotCooCoo edcad3c183 Tests: test-lint judges negations, cfg escapes and module declarations exactly
- census keeps the polarity of a negation: `!parse(x).is_ok()` is a
  rejection, while `!xs.is_empty()` stays a presence check.
- reads-source looks at the last path literal of a read_to_string
  argument, so `root.join("fixtures.rs").join("input.json")` is not a hit.
- never-run reads an escaped cfg string value as unknown, takes every
  `mod` declaration of a module (`#[cfg(windows)]` and `#[cfg(unix)]`
  both count), and ties a change to an attribute only when that
  attribute excludes a CI target.
- exact-pixel does not count a coordinate passed to a function.
- docs/development.md says when never-run can decide a cfg.
2026-12-01 02:39:39 -08:00
dotCooCoo fc5b42e304 xtask: census counts rejections in .all() and bounded zip ranges
An .all(...) predicate that calls unwrap_err or expect_err on a branch
that always runs now checks a rejection, like an asserting helper.
A zip with a bounded range (zip(0..2)) bounds the loop, while an
open-ended range (zip(0..)) still visits every entry. Rejection calls
are matched with whitespace inside them (unwrap_err ()) at every site.
2026-12-01 02:21:12 -08:00
dotCooCoo 0f95fb0880 Merge main into chore/never-run-test-allows 2026-12-01 02:21:01 -08:00