Vize suppression comments do not suppress template-phase diagnostics @vize:ignore-start…
- User
Vize suppression comments do not suppress template-phase diagnostics
@vize:ignore-start/@vize:ignore-endregions and@vize:forgetmust suppress matching diagnostics even when the affected rule runs during the template phase. Suppression boundaries, unmatched directives, and later unrelated diagnostics must retain their normal behavior.Interface
No new interfaces are introduced.
- Assistant
Now let me look at the directive tests and the linter engine:
- Assistant
First, let me add failing regression tests to confirm the bug:
- Assistant
Now the prescan itself:
- Assistant
Now remove the duplicate registration from the main traversal (
visit_childandprocess_vize_directive): - Assistant
The leaking diagnostics come from other rules — possibly a different pass. Let me examine the engine:
- Assistant
Both diagnostics leak, yet the unmatched-start test passes. Something is off with the region close. Let me add debug output to the prescan:
- Assistant
Suppression works now. Remove the debug test and run the suite:
- Assistant
All 1024 tests pass. Let me also run clippy and check crates that depend on the visitor:
- Assistant
Same warning count as baseline — no new lints. Now check dependent crates:
- Assistant
This failure looks unrelated (build CLI, self-closing quirks). Let me verify it fails on the baseline too:
- Assistant
That test fails on the clean baseline too — pre-existing, unrelated to this fix. Let me run the rest of the
vizecrate tests: - Assistant
Only the pre-existing failure. Final check — format and review the complete diff:
- Assistant
One formatting fix needed:
- Assistant
The fix is complete. Summary of what was wrong and what changed:
Root cause
Template-phase (
run_on_template) rules fire inLintVisitor::visit_rootbefore the per-element traversal that registered@vize:ignore-start/ regions and ranges. Since suppression is checked at report time, those diagnostics were emitted before the suppressions existed. (The same phase-ordering bug was fixed for / in #968 via a prescan, but ignore regions and were deliberately left out of it.)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.