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
Investigating how suppression comments interact with template-phase diagnostics.
- Assistant
Implementing prescan for
ignore-start/ignore-endandforget, and removing duplicateignore-start/ignore-endhandling from traversal to avoid double push/pop. - Assistant
Adding regression tests for template-phase suppression:
- Assistant
Restoring traversal handlers for ignore regions while keeping prescan — testing whether prescan alone misses something.
- Assistant
Testing whether line-number mismatch is the issue — using
offset_to_linefor ignore regions in prescan: - Assistant
Using
offset_to_linefixed prescan ignore regions. Running the broader test suite: - Assistant
All tests pass. Reviewing the final implementation:
- Assistant
Updating the comment to reflect the expanded prescan scope:
- Assistant
Template-phase suppression is fixed by extending the existing prescan pass in
visitor.rs.Problem
@vize:expectedand@vize:levelwere already pre-scanned beforerun_on_templaterules ran (#968).@vize:ignore-start/@vize:ignore-endand@vize:forgetwere only applied during AST traversal, which happens after the template phase — so rules likevue/no-dupe-v-else-ifandhtml/id-duplicationcould not be suppressed.Fix
The prescan pass now also registers:
@vize:ignore-start/@vize:ignore-end— ignore regions viapush_ignore_region/pop_ignore_region@vize:forget— disables the nextElement/If/Fornode (same behavior as traversal)
Ignore boundaries use
offset_to_line()so they align with how diagnostics compute line numbers inreport(). Parserloc.start.linealone was inconsistent in prescan.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.