You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with --warnon:1182 enabled, there will be a diagnostic issued for the parameter i, but the current codefix will not handle this scenario.
Describe the solution you'd like
I think a small change to the TryRangeOfBindingWithHeadPatternWithPos member could be made very similarly to what I've done in this PR, and the range that is derived from this member could be tagged as coming from a pattern or a binding.
psfinaki
changed the title
Enhancement to RemoveUnusedBinding codefix to remove unused parameter patterns as well
RemoveUnusedBinding offers to remove unused parameters but doesn't remove them
Jun 15, 2023
Is your feature request related to a problem? Please describe.
I think this reported issue/feature gap in FSAC is reproducible in the VS tooling as well.
For the code:
with
--warnon:1182
enabled, there will be a diagnostic issued for the parameteri
, but the current codefix will not handle this scenario.Describe the solution you'd like
I think a small change to the TryRangeOfBindingWithHeadPatternWithPos member could be made very similarly to what I've done in this PR, and the range that is derived from this member could be tagged as coming from a pattern or a binding.
Then, later in the codefix that result would be inspected to walk the text in slightly different ways for patterns and bindings, so that both kinds of triggering entities for this diagnostic could be handled.
Describe alternatives you've considered
Not doing this work, so that only nested bindings are removable.
The text was updated successfully, but these errors were encountered: