Commit 9aaeda8
committed
ci(test): enforce dylint warnings as errors
Pass RUSTFLAGS="-D warnings" to cargo dylint so any rule violation now
fails the script, matching what cargo clippy already does. Suppress the
two known macro_trailing_comma sites in tests/tree_builder.rs and
tests/visualizer.rs via crate-level cfg_attr-gated attributes:
* Gate everything on cfg(dylint_lib = "perfectionist") so the
attributes only apply during dylint runs (the cfg is set by dylint's
RUSTC wrapper). This keeps stable cargo check untouched and matches
the user preference for narrow handling of unknown_tool, since
perfectionist is registered as a tool only when dylint is active.
* register_tool(perfectionist) under #![feature(register_tool)] makes
rustc accept the perfectionist:: lint prefix on the nightly toolchain
that dylint uses, avoiding E0710.
* Use expect rather than allow for macro_trailing_comma per project
preference, with an accompanying allow(unfulfilled_lint_expectations)
because perfectionist appears to short-circuit when its lint is
expected at crate scope, leaving the expect unfulfilled despite
actual violations.
* allow(unexpected_cfgs) covers the dylint_lib cfg name itself, which
rustc does not learn from --check-cfg.1 parent 58bee1d commit 9aaeda8
3 files changed
Lines changed: 44 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
1 | 22 | | |
2 | 23 | | |
3 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
1 | 22 | | |
2 | 23 | | |
3 | 24 | | |
| |||
0 commit comments