Skip to content

Improve detection and replacement logic for 'remove binding' codefix#812

Merged
baronfel merged 1 commit intoionide:masterfrom
baronfel:fix-remove-binding-codefix
Jun 28, 2021
Merged

Improve detection and replacement logic for 'remove binding' codefix#812
baronfel merged 1 commit intoionide:masterfrom
baronfel:fix-remove-binding-codefix

Conversation

@baronfel
Copy link
Contributor

Closes #811

The logic here is to dive into the SynPat of a Binding first to see if we can find a more specific pattern replacement instead of the entire binding. If we can, then the replacement logic (tokens to look for, etc) is slightly different for an entire pattern, but structurally quite similar.

I added tests for several cases, and I do think this is a better way to go. We should consider upstreaming this as well.

@baronfel
Copy link
Contributor Author

Reported upstream with links, so we can merge this now.

@baronfel baronfel merged commit d6bc9ac into ionide:master Jun 28, 2021
@baronfel baronfel deleted the fix-remove-binding-codefix branch June 28, 2021 23:30
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.

Remove Unused Binding codefix throws an exception for unused function parameters

1 participant