Wrong "variable 'version' is not used" inspection warning #4083
Labels
bug
Identifies work items for known bugs
feature-inspections
inspection-false-positive
A bug where an inspection result appears, even though it is incorrect.
resolver
Issue is easier to resolve with knowledge of the internal resolver API and the Antlr4 parse trees.
Projects
I am getting the Variable 'version' is not used warning for the version variable on this sub:
The Debug.Print usage is not being considered as valid by the inspection, but in this particular case I think it's valid, since the function is supposed to write the required version values to the Immediate Window. I have another occurence of this inspection for a variable that is used to write a sub's execution elapsed time to the Immediate Window, which I also think is valid.
My suggestion would be to add a rule to count the Debug.Print variable appearances as valid usages, instead of having to mark each variable declaration with the
'@Ignore VariableNotUsed
annotation.Thanks!
The text was updated successfully, but these errors were encountered: