Skip to content

fix(unused-variables): treat get_defined_vars() as using all variables in scope#158

Open
calebdw wants to merge 1 commit into
PHPantom-dev:mainfrom
calebdw:calebdw/push-uoqowqsutxol
Open

fix(unused-variables): treat get_defined_vars() as using all variables in scope#158
calebdw wants to merge 1 commit into
PHPantom-dev:mainfrom
calebdw:calebdw/push-uoqowqsutxol

Conversation

@calebdw

@calebdw calebdw commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

get_defined_vars() (like compact()) references variables by name without a direct read. When present in a function/method body, suppress unused-variable diagnostics for all locals to avoid false positives on debug/introspection code.

@calebdw calebdw force-pushed the calebdw/push-uoqowqsutxol branch from 7385c1a to f5d93af Compare June 18, 2026 11:59
@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 44.76190% with 174 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/diagnostics/undefined_variables.rs 29.83% 174 Missing ⚠️

📢 Thoughts on this report? Let us know!

…s in scope

`get_defined_vars()` (like `compact()`) references variables by name without
a direct read. When present in a function/method body, suppress unused-variable
diagnostics for all locals to avoid false positives on debug/introspection code.
@calebdw calebdw force-pushed the calebdw/push-uoqowqsutxol branch from f5d93af to b894669 Compare June 18, 2026 13:17
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.

2 participants