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

RD needs an inspection for variable reassigned but never re-used #2243

Closed
ThunderFrame opened this issue Sep 19, 2016 · 1 comment
Closed
Labels
duplicate Thanks for the feedback! We're already tracking this report/request at the linked issue. enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections

Comments

@ThunderFrame
Copy link
Member

RD already has an inspection for Variable 'x' is not used, which catches this:

Private Sub Test1()
  Dim status As String
  status = foo
End Sub

But it fails to catch unused re-assignments after usage:

Private Sub Test2()
  Dim status As String
  status = "foo"
  Debug.Print status
  status = "bar"
End Sub

This is related to #882, but instead of being a reassignment before use, this inspection is for unused reassignment after prior use.

@retailcoder retailcoder added the duplicate Thanks for the feedback! We're already tracking this report/request at the linked issue. label Sep 19, 2016
@retailcoder
Copy link
Member

#882 Value not used is meant to do exactly that

@Vogel612 Vogel612 added enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. and removed feature-request labels Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Thanks for the feedback! We're already tracking this report/request at the linked issue. enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections
Projects
None yet
Development

No branches or pull requests

3 participants