Files
vectorcraft/xtask
dotCooCoo 3f5fe6a521 xtask: test-lint reads paths, fields, run scripts and user values more exactly
all-unguarded:
- A numeric index (`xs[1]`, `xs[12]`) shows that a collection has items,
  as `xs[0]` did, except an item whose own `.iter()` runs the `.all`.
- A size check of a plain local (`xs.len()`) guards an `.all(…)` only when
  nothing between them may shrink or replace the local, and an operand
  that shrinks it after reading its size (`{ let n = xs.len(); xs.clear();
  n }`) guards nothing.
- A pinned snapshot stops guarding when a local it passes as a selector
  (`r.items(active)`) changes after it.
- An equality assertion pins a length only where it always runs before
  the `.all`: at the level of the test body, or earlier in its block.
- A field or path segment with a local's name (`other.xs.clear()`,
  `settings.active = false`) is not that local; a range (`0..n`) is not a
  field access.
- Passing a `&mut` local to a call, `(xs).clear()`, `(xs) = …` and a
  destructuring assignment (`(xs, _) = …`) count as changes.
- `as_chunks` and `as_rchunks` keep every item.

constant-echo and fixture-only:
- `into` is not a fixture read; `clone`, `to_string`, `to_owned` and
  `to_vec` are not when the receiver is a value of a type the test names,
  or a container holding one.
- An arithmetic or bitwise operator on such a value runs that type's code.
- Non-ASCII local names (`数`) are names, not constants.
- A `for` with a block as its iterator binds inside the loop body.

Test discovery and helpers:
- A test whose signature holds an array type or a braced const argument
  is found.
- A qualified path (`<T as Trait<A, B>>::VALUE`) is one operand.
- Helper names with non-ASCII letters (`vérifier`) are read whole.
- A closure or async block bound to `_` does not run, so its assertions do
  not count.
- A closure call shadowed by a `for` pattern, a closure parameter or a
  match arm, or called through a path (`other::run()`), is not a call of
  the outer closure.
- Calls inside a nested `fn` in a wait loop do not count as polling.
- `exit-status-only` reports an assertion only when the exit status alone
  can pass it (`status.success() && out.exists()` checks more).

Changed lines:
- `mirror` and `exact-pixel` hits run through the second compared
  operand, so a change to it on its own line counts.
- Deleting only blank lines or comments outside every test and literal
  marks no test as changed; a deleted comment inside a test, an allow
  marker or a block-comment edge still does. The base file is read
  untrimmed so its line numbers match the diff.
- The diff runs with `--text`, so a Rust file git takes for binary still
  reports its changed lines.
- A `never-run` test whose gate moves from report-only to failing counts.
- A nested `cfg_attr` path is followed under both conditions.

Workflow variables:
- A quoted `run:` value is decoded before its shell quotes are read, a
  comment in it ends at its line break, and a line break ends an `echo`
  unless a backslash continues it.
- Assignment text inside a quoted value (`message="MY_SAMPLES=x"`) sets
  no variable.

The tests that build a temporary repository remove it when an assertion
fails.
2026-12-03 09:40:41 -08:00
..