Skip to content

Unclear what the fix will be using "Fix all occurrences in ..." #5464

@Burky

Description

@Burky

Code Inspections
If I get one warning,>>The attribute value(s) for attribute VB_Description ("....") are out of sync with the Description annotation.<< I regularly right-click that inspection and select either >>Adjust attribute annotation<< (1st option), or >>Adjust attribute value(s)<< (2nd option). So far, so good.


Why
Normally, I get a lot of above warnings all over the place, because I re-generated (hundreds of) code modules and classes and, as part of that regen, assigned modified descriptions. Now, when I select "Fix all occurrences in the project" and run the fix, Rubberduck replaces all my new annotations (I urgently want to keep) with the old attribute values from the file (that I cannot touch directly)! That's no fix, that's a nightmare!


Ambiguity
It is, alt least not for RubberNewbies, not clear, what the fix will be if there is more than one option beneath "Ignore once." For me, after some testing, the first option in the right-click popup is the fix. But I haven't found any documentation about that to prove that.


Quick fixes
I'm not suggesting a particular new Quick-Fix, but an overall improvement:
Instead of offering static hyperlink-like selectors "Fix all occurrences ... " (which in most cases is ambiguous what exactly the FIX will do ), one should be more precise and alter the hyperlink caption based on the selected issue, like so: "Adjust all attribute annotation in procedure", "Adjust all attribute annotation in module", "Adjust all attribute annotation in the project", a.s.o.
And, in addition to that, there also should be the alternative options available, like "Adjust all attribute value(s) in procedure", "Adjust all attribute value(s) in module", "Adjust all attribute value(s) in the project", a.s.o.


Other distracting Oddities
There are more (at least to me) distracting oddities, I would like to mention here. Maybe it would be better to create a new topic, but I do not have the time. So, please forgive me :-)

1st) It is possible to multi-select issue-lines in the Code Inspections pane. Nice! But what are they good for? There should be an additional line of options: "Adjust SELECTED attribute annotation", or just "Adjust SELECTION"

2nd) When I was new to RubberDuck, I used the default setup and Window/Pane layout. On my local development system (MacBook Pro coupled with iPadPro using Parallels VM and Duet), the lower Code Inspections Pane was not tall enough to display the "Fix all occurrences..." hyperlinks because they are fixed to the bottom of the lower pane. Thus, I never saw them, until I found it out myself when dragging up the horizontal pane gripper, by change. My suggestion, therefore, is: Put them up above the explanation section. Make the action-links most paramount!

3rd) Until today, I did not find a Quick-Fix to remove a VB_PredeclaredID once I've set it. There should be an Inspection that offers me that option. But maybe I've just overseen it? No, I don't think so.

Metadata

Metadata

Assignees

Labels

enhancementFeature requests, or enhancements to existing features. Ideas. Anything within the project's scope.feature-inspectionsup-for-grabsUse this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions