Commit 71a6b66
committed
chore(deps): bump
8925331 redesigns `macro_argument_binding` from "flag every macro
with a non-trivial top-level argument" to a curated `AllowAndDeny`
mode: only invocations on the built-in deny list (`debug_assert`,
`debug_assert_eq`, `debug_assert_ne`) plus user `deny_extra`
trigger the rule, and the built-in allow list silences common
once-only macros (`format`, `vec`, `assert`, …). The trivial-
expression grammar also gains a pure-getter postfix walker so
`vec.len()`, `s.is_empty()`, `opt.as_ref()`, and the rest of the
built-in zero-arg list stay trivial.
Adopt the new config knobs:
- `deny_extra = ["debug_assert_op", "debug_assert_op_expr"]`
enrolls the `assert-cmp` family alongside the std
`debug_assert*` macros so non-trivial arguments still get
caught despite their conditional `cfg(debug_assertions)`
expansion.
- `allow_extra = ["bump", "visualize", "test_case"]` catalogues
the three remaining project-defined macros that expand each
top-level argument exactly once.
The combination eliminates two suppressions that were necessary
under PR 52's head (`93cb529`):
- `src/visualizer/methods/tree_table.rs` — `intermediate_table
.len()` is now trivial via the built-in pure-getter list.
- `tests/bytes_format.rs` — `test_case!` is in `allow_extra`, so
the rule no longer fires on its `name -> value in system ==
expected` DSL invocations. The crate-root suppression and the
`register_tool(perfectionist)` it required are gone.
The late-pass anchoring bug #419 is mechanistically unchanged:
`src/rules/macro_argument_binding/late.rs` is byte-identical
between `93cb529` and `8925331`. The new `allow_extra` /
`deny_extra` mechanism sidesteps #419 in practice for
user-defined macros (config-level allow needs no `#[expect]`),
but the underlying anchoring bug for item-position macro
expansions still exists.
https://claude.ai/code/session_01CoRidYHvni9nKNgxMPXmfQperfectionist to 8925331 and adopt deny/allow config1 parent d948bd5 commit 71a6b66
3 files changed
Lines changed: 22 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
41 | 62 | | |
42 | 63 | | |
43 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 1 | | |
12 | 2 | | |
13 | 3 | | |
| |||
0 commit comments