Skip to content

Conversation

@0xrusowsky
Copy link
Contributor

Motivation

closes #12724

the existing implementation missed the fact that users can declare local variables in the "before" block, and use them in the "after" block.

Solution

track the "shared" variable by capturing all the locally defined variables in the "before" block and intersecting them with all the used variables in the "after" block. Then, use the shared variable info to modify the suggested snippets with those variables.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

bug(lint): unwrap modifier doesn't handle var assignments properly

2 participants