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
I'll investigate how Vize suppression comments interact with template-phase diagnostics in the codebase.
- Assistant
Implementing prescan for
ignore-start/ignore-endandforgetso they apply before the template phase, matching@vize:expected. - Assistant
Removing dead
forget_next_elementtraversal logic now that prescan handles it. - Assistant
Adding regression tests and running the patina test suite.
- Assistant
The bug is that
comment.loc.start.lineis wrong for some comments —offset_to_linegives the correct line. Updating ignore-region handling to use it. - Assistant
All tests pass. Updating the prescan comment and verifying the final code.
- Assistant
Fixed suppression for template-phase diagnostics.
Root cause:
@vize:ignore-start/@vize:ignore-endand@vize:forgetwere only applied during AST traversal, which runs afterrun_on_template. Template-phase rules likevue/no-dupe-v-else-ifemitted diagnostics before suppression was registered.Fix: Extended the pre-scan pass (already used for
@vize:expected/@vize:level) to also register:@vize:ignore-start/@vize:ignore-endregions@vize:forgetelement ranges
For ignore boundaries, line numbers now come from
offset_to_line()instead ofcomment.loc.start.line, which was wrong for comments after the first line (e.g.ignore-endon line 3 was reported as line 1).Regression tests added in
directives.rsfor:- ignore regions suppressing
run_on_templatediagnostics - boundary preservation (errors outside the region still reported)
@vize:forgetsuppressing only the next element’s template-phase diagnostics
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →