Repository navigation
Description
Context
DESIGN.md F6 and section 9: a collection that grows from input grows through the operation's budget (BudgetVec). #43 made clippy refuse the growing methods of the standard collections in the store (crates/pyropdf-store/clippy.toml). Clippy reads the configuration nearest to the crate that it checks, and #43 left the other crates out, so nothing checks F6 in pyropdf-schema, pyropdf-engine, or pyropdf-python.
Applied to them at 0.2.2 (11bbbba), the store's configuration reports:
| Crate | Uses | Files | Of which pyropdf_store::value::Dict::insert and Array::push |
|---|---|---|---|
| pyropdf-schema | 24 | 2 | 0 |
| pyropdf-engine | 615 | 38 | 156 |
| pyropdf-python | 548 | 25 | 246 |
CLIPPY_CONF_DIR="$PWD/crates/pyropdf-store" cargo clippy -p pyropdf-schema -p pyropdf-engine -p pyropdf-python --lib --all-features --message-format=shortMany uses are bounded by something other than input (12 of 14 sampled Dict::insert calls write a constant key), but without the check no one can tell which. This issue sets up a configuration that every crate can share and checks the smallest crate with it. The engine and the binding follow in their own issues, which this one blocks.
Goal
pyropdf-schema is checked as the store is, by a configuration that the engine and the binding adopt without copying it.
Scope
In:
- where the configuration lives: for example one
clippy.tomlat the workspace root, which clippy finds by looking upward from a crate's manifest, with the store's extra entries in its own file; or another arrangement that keeps one list; - whether the crates outside the store disallow
Dict::insertandArray::push. In the store they check the store's own value growth; elsewhere most calls write constant keys; - the 24 uses in pyropdf-schema: grown through the budget, or
#[expect(clippy::disallowed_methods, reason = "...")]with what bounds them; - AGENTS.md's F6 sentence, which names the store's file.
Out: the engine and the binding (their own issues); fuzz/ and the evidence crates, which tools/check.py does not lint.
Paths
clippy.toml (new, at the root) or crates/pyropdf-schema/clippy.toml, crates/pyropdf-store/clippy.toml, crates/pyropdf-store/src/lib.rs, crates/pyropdf-schema/src/, and AGENTS.md (the F6 sentence).
Acceptance
- The configuration binds pyropdf-schema, and CI's
cargo clippy --workspace --all-targets --all-features -- -D warningspasses with each remaining use either budgeted or expecting the lint with its bound. - The store refuses the same uses as before.
- The configuration's comment records whether
Dict::insertandArray::pushare disallowed outside the store, and why. - The engine and binding issues name the configuration that they adopt.
- AGENTS.md's F6 sentence points at the shared configuration.
Notes
- The store's
lib.rsallows the lint undercfg(test); each crate that adopts the check needs the same. - A root
clippy.tomlis also found byfuzz/and the evidence crates when someone runs clippy there. Keep them unaffected, or say why it does not matter. - Check that the store grows input-derived collections through the budget #43's pull request is the model for the
expectreasons.
Activity
yhay81 commentedon Nov 5, 2026
Claimed. Branch:
claude/675-shared-clippy-config.yhay81 commentedon Nov 5, 2026
Handoff: PR #680 on
claude/675-shared-clippy-config, awaiting the owner's review.crates/clippy.toml, which is the store's list moved unchanged. It binds every crate undercrates/that has noclippy.tomlof its own. It reaches neitherfuzz/, the evidence crates, nor worktrees under.claude/; a root file would reach all of them.clippy.tomluntil Check that pyropdf-engine grows input-derived collections through the budget #676 and Check that pyropdf-python grows input-derived collections through the budget #677 delete it. Both issues now say how to adopt the configuration and how to count their uses.Dict::insert,Array::push, andArray::insertstay disallowed outside the store. The store's methods expect the lint because their calls are checked. A call with a constant key adds one entry at most and expects the lint with that bound.BudgetVec.tests/test_clippy_config.pykeeps the unbound crates to the two that it lists.-D warnings), cargo test, ruff, and ty pass. Locally on Windows, pytest fails 16 tests that compare stale CRLF copies of committed fixtures with the generator's bytes. The same checks pass on the generator's bytes, as the PR describes.clippy.toml").Check collection growth in pyropdf-schema with a shared clippy config…
Name the shared clippy configuration in DESIGN.md section 9 (#679) (#681