ISSUE DESCRIPTION Vize suppression comments do not suppress template-phase diagnostics…
- User
ISSUE DESCRIPTION
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.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /vize, current file: none) bash-$
Assistant
Now let's write a reproduce script/test to confirm the issue with ignore-start/end and forget for template-phase rules (e.g.
vue/no-dupe-v-else-if).Assistant
Confirmed the bug. Now let's implement the fix: prescan IgnoreStart/IgnoreEnd (building disabled_all ranges) and Forget (applying disable_all to the next element's range) before running
run_on_templaterules.Assistant
Now let's implement the fix.
Assistant
Now let's replace this block with the new implementation.
Assistant
Now let's remove the debug print in report() and run tests.
Assistant
All pass now. Let's test with a scenario where the ignore-start/forget comment is NOT on line 1, to confirm the fix generalizes.
Assistant
All pass. Now let's remove the temporary test additions and run the full test suite to make sure nothing else broke.
Assistant
Good, test file reverted (temporary tests removed) but real fix in visitor.rs remains. Now let's run the broader vize_patina test suite, and other crates depending on it (e.g., vize_maestro).
Assistant
All pass. Let's now run the full workspace test suite that might touch this code (vize_maestro, vize_atelier_*, croquis).
Assistant
Builds fine. Let's run the full workspace test suite (may take time), focusing on maestro and patina, plus overall.
Assistant
All pass. Now let's run the entire workspace test suite to be thorough.
Assistant
Confirmed this test fails on the base commit too (pre-existing failure unrelated to our change). Let's restore our changes.
Assistant
Good, pre-existing failure unrelated to our fix. Let's run the rest of the workspace tests to ensure nothing else broke.
Assistant
All the same failures exist pre-change - these are pre-existing environment issues unrelated to our fix. Let's restore our changes.
Assistant
All pre-existing failures are identical before/after our change, confirming our fix doesn't introduce regressions. Let's view the final diff for review.
Assistant
Good, only one production entry point (
linter::engine), which we've already fixed. Let's finalize by re-running the target directive tests and diff clean-up.Assistant
All directive-related tests pass. Let's view the git diff once more to confirm final state, and check for clippy warnings.
Assistant
No clippy warnings. Now let's finalize by checking
git statusand viewing the complete diff once more before submission.Assistant
The change is clean and focused. Now let's go through the checklist.
Assistant
Final verification pass. Let's summarize the checklist:
Checklist review:
-
Reproduced the error: Yes — I wrote temporary tests confirming
@vize:ignore-start/@vize:ignore-endand@vize:forgetfailed to suppressvue/no-dupe-v-else-if(arun_on_template-phase rule), reproducing the exact issue described. -
Confirmed the fix resolves it: Yes — after the fix, all reproduction tests passed, including edge cases (directive not on line 1, diagnostics after
ignore-endstill reported normally). -
Edge cases considered:
- Directives not located on line 1 (discovered and fixed the underlying root cause:
comment.loc.start.linefrom the parser is unreliable, so switched toLintContext::offset_to_line, which is always correct). @vize:forgetapplying toElement,For, andIf(v-if/v-else-if chains) nodes.- Recursion into nested elements,
forloops, andifbranches for directive pre-scanning (previouslyIfbranches weren't recursed into at all). - Diagnostics after an
ignore-endregion remain unsuppressed (verified with a dedicated test). - Unmatched/orphan directives retain prior behavior (pop/push logic unchanged, only the pre-scan timing and line computation changed).
@vize:forgetwithout a reason still emits its warning (unaffected, still handled in the main traversal only, not the pre-scan).
- Directives not located on line 1 (discovered and fixed the underlying root cause:
-
Ran existing tests: Ran full
vize_patinaandvize_maestrotest suites (all passing) and the entire workspace test suite with--no-fail-fast, confirming that failures present are pre-existing (identical before/after the change viagit stashcomparison) and unrelated to this fix.
-
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
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →