Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeverAccessedVariables: Track foreach and catch variables #312

Open
jubnzv opened this issue Mar 1, 2025 · 0 comments
Open

NeverAccessedVariables: Track foreach and catch variables #312

jubnzv opened this issue Mar 1, 2025 · 0 comments
Labels
area:detectors Related to existing detectors enhancement New feature or request

Comments

@jubnzv
Copy link
Member

jubnzv commented Mar 1, 2025

fun test() {
    let m: map<Int, Int> = emptyMap();
    foreach (k, v in m) { /* k and v should be used */ }
    try { whatever(); } catch (e) { /* e should be used */ }
}

k and v should be reported by neverAccessedVariables.

@jubnzv jubnzv added enhancement New feature or request area:detectors Related to existing detectors labels Mar 1, 2025
@jubnzv jubnzv changed the title NeverAccessedVariables: Track foreach variables NeverAccessedVariables: Track foreach and catch variables Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:detectors Related to existing detectors enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant