Skip to content

fix: spurious unused variable warnings#790

Merged
david-christiansen merged 1 commit intomainfrom
fix-unused-vars
Mar 10, 2026
Merged

fix: spurious unused variable warnings#790
david-christiansen merged 1 commit intomainfrom
fix-unused-vars

Conversation

@david-christiansen
Copy link
Copy Markdown
Collaborator

Fixes an issue where variables in Lean code blocks would trigger spurious unused variable warnings.

The issue happens because the unused variable linter inspects info trees. With embedded Lean blocks, it runs twice: once for the embedded code, and again on the Verso command. The second time around, the Verso syntax doesn't match the ignore functions, so it triggers spurious warnings.

This bug was previously masked by the source span issue that was fixed in #700.

Fixes an issue where variables in Lean code blocks would trigger
spurious unused variable warnings.

The issue happens because the unused variable linter inspects info
trees. With embedded Lean blocks, it runs twice: once for the embedded
code, and again on the Verso command. The second time around, the
Verso syntax doesn't match the ignore functions, so it triggers
spurious warnings.

This bug was previously masked by the source span issue that was fixed
in #700.
@github-actions
Copy link
Copy Markdown
Contributor

Preview for this PR is ready! 🎉

@david-christiansen david-christiansen added this pull request to the merge queue Mar 10, 2026
Merged via the queue into main with commit 19c5d29 Mar 10, 2026
12 checks passed
@david-christiansen david-christiansen deleted the fix-unused-vars branch March 10, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant