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

The Rubber Duck is greedy and feeds on VB Attributes (not a joke) #6216

Open
AstrocalcVB opened this issue Jun 11, 2024 · 0 comments
Open

The Rubber Duck is greedy and feeds on VB Attributes (not a joke) #6216

AstrocalcVB opened this issue Jun 11, 2024 · 0 comments
Labels
bug Identifies work items for known bugs

Comments

@AstrocalcVB
Copy link

Rubberduck version information
The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:

Version 2.5.9.6316
OS: Microsoft Windows NT 6.2.9200.0, x64
Host Product: Visual Basic x86
Host Version: 6.00.9782
Host Executable: VB6.EXE

Description
In Code Inspections, applying a quick fix to Language Opportunities: "Assignment uses obsolete 'Call' modifier" - all user added Attributes like "Attribute Procedure_name.VB_Description = "Some text..." are removed from the modules file.

Not only VB_Description attributes are removed.
That's greedy I would say, ducks should stick to eating grass ;-)

Furthermore, there seems to be a second bug here as well; Choosing "Remove obsolete statement ->Selected occurrence or Occurrences in module" does what it says but if you choose "Occurrences in procedure" the Duck goes for the whole project.

To Reproduce
Steps to reproduce the behavior:

  1. Make sure to have a module with one or more Call modifier and VB_Description Attribute
  2. Open Code Inspections from Rubberduck menu.
  3. Right click item with Call modifier notice and select one of the options in the context menu "Remove obsolete statement"
  4. When RD is done, save the VB file and then check it in a text editor. All attributes are gone.

Expected behavior
It should leave my attributes alone.

Logfile
A Trace log file just gets enormously big like 50k+ rows so I just include for Debug level, which is still 6k+
RubberduckLog.txt

Additional context
Add any other context about the problem here.

@AstrocalcVB AstrocalcVB added the bug Identifies work items for known bugs label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies work items for known bugs
Projects
None yet
Development

No branches or pull requests

1 participant