feat(codegen): infer workspace token modules - #311
Conversation
|
I now have everything needed. Let me write the structured review. PR #311 —
|
| # | File | Lines | Issue | Class |
|---|---|---|---|---|
| 1 | crates/plumb-codegen/src/ts_tokens.rs |
405-412 | Inner sort_unstable/dedup is redundant — infer_config runs sort_and_dedup on the same fields immediately after; remove the inner pass |
Warning |
| 2 | crates/plumb-cli/tests/init_from.rs |
97-106 | Structured TOML output validated with contains checks; should be insta::assert_snapshot! per testing rule |
Warning |
| 3 | crates/plumb-codegen/src/walk.rs |
1493-1537 | Test module uses .unwrap() without #[allow(clippy::unwrap_used)], inconsistent with ts_tokens.rs:1103 |
Warning |
| 4 | crates/plumb-codegen/src/ts_tokens.rs |
1009-1012 | has_joined joins all hints then does substring search — "discolor" matches "color", "monospace" wouldn't but edge cases exist; document the intentional liberal-match design |
Warning |
No blockers found. Determinism invariants, workspace layering, error propagation, and public-API documentation are all correct.
Verdict: APPROVE
Summary
plumb init --from apps/<name>plumb.tomlValidation
cargo fmt --all -- --checkcargo test -p plumb-codegencargo test -p plumb-cli --test init_fromcargo clippy -p plumb-codegen -p plumb-cli --all-targets --all-features -- -D warningsRUSTDOCFLAGS='-Dwarnings' cargo doc --workspace --no-depsjust validatePLUMB_CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" scripts/noise-scoreboard.sh --liveScoreboard
Review Notes
1e3,1_000,0x10,0b10,0o10,100n, and bare12pxare skipped rather than partially parsed.