Skip to content

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

Open
@AstrocalcVB

Description

@AstrocalcVB

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIdentifies work items for known bugsvb6-specificIssues which only affect RD in VB6

    Type

    No type

    Projects

    • Status

      Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions