Rubberduck: 'Variable not assigned' needs to drop the part about being declared

Created on 17 Mar 2017  路  12Comments  路  Source: rubberduck-vba/Rubberduck

The inspection's meta reads like this:

A variable is declared, but never assigned a value/reference. [...]

But it fires for undeclared variables that aren't assigned, too - let's just drop the part about it being declared, that would be a holdover from before Rubberduck supported undeclared variables.

difficulty-01-duckling enhancement feature-inspections up-for-grabs

All 12 comments

Hi, I'm having trouble finding the affected file(s). Any pointers?

@morrme that would be the InspectionsUI.resx resource file, under the Rubberduck.Parsing.Inspections.Resources namespace.

@retailcoder Thanks!
So should the text read:

Variable is never assigned

or

Variable has not been assigned

There's another message underneath that says

Variable is declared but never assigned

Should a change be made to that one as well?

@morrme yeah - messages that assume the variable is declared are likely all outdated. Well spotted!

I think I prefer the first style, "is not assigned"

@retailcoder great!

Just to check, what about:

Constant value is declared but Rubberduck could not find any reference to it. Consider removing the unused declaration.

Hmm.. constants cannot be undeclared anyway - "constant is declared" would be redundant IMO.

@morrme I see you forked RD - if you have some rep score on Code Review Stack Exchange, feel free to join the devs in our dedicated chat http://chat.stackexchange.com/rooms/14929/vba-rubberducking - quite possibly going to be quiet this weekend, but still, if you want help with the API or have any question about Rubberduck, it's the best place to ask. If you don't have the 20 required reputation points to chat on CR.SE, as a moderator I can grant you explicit write access to the chatroom.

@retailcoder OK so that one could change to
Rubberduck could not find any reference to constant. Consider removing the unused declaration.

Thanks for the invite! I don't have an account there, but it would be cool to check out.

Closed with linked commit, but .fr and .de resources will need to be updated too.

@retailcoder that was going to be my next question, actually......about the translations!

@morrme don't worry about the translations, they needed to be updated anyway. I think .fr resources haven't been updated since the 2.0.12 release.

@retailcoder wow! well good that they'll be handled too. I hope to get to help out with another task in the future ! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bclothier picture bclothier  路  3Comments

Gener4tor picture Gener4tor  路  3Comments

philippetev picture philippetev  路  3Comments

retailcoder picture retailcoder  路  3Comments

Hosch250 picture Hosch250  路  3Comments