Special comments that unlock certain Rubberduck tools.
More than just comments, annotations provide Rubberduck with actionable metadata that is used to support Rubberduck-specific features, such as unit testing, or custom folers in the Code Explorer toolwindow
A specific subset of annotations work in conjunction with inspections and quick-fixes, to surface hidden module and member attributes that are otherwise only editable by exporting the module and editing in a text editor, then re-importing the modified module into the project: Rubberduck automates this, and that gives you full control over how your class modules behave.
Because depending on its location it could be impossible to tell whether the target of a particular is the module or its first procedure, annotations are divided in two main categories: module annotations that go in a module’ declarations section, and member annotations that go above a procedure’s signature... and this is why annotations @Description
and @ModuleDescription
had to be separate.
This tab lists all items found in the .xml documentation assets from the latest pre-release build. To modify this content, a pull request must be merged into the [next] branch.
@Interface annotation, marks a class as an abstract interface; Rubberduck can use this valuable metadata in its code analysis.
@MemberAttribute annotation, indicates the presence of a hidden member attribute; allows specifying arbitrary VB_Attribute for members. Use the quick-fixes to "Rubberduck Opportunities" code inspections to synchronize annotations and attributes.
@ModuleAttribute annotation, indicates the presence of a hidden module-level attribute; allows specifying arbitrary VB_Attribute for modules. Use the quick-fixes to "Rubberduck Opportunities" code inspections to synchronize annotations and attributes.
@ModuleCleanup annotation, marks a procedure that Rubberduck executes after all tests of a module have completed.
@ModuleDescription annotation, indicates the presence of a VB_Description module attribute value providing a docstring for the module. Use the quick-fixes to "Rubberduck Opportunities" code inspections to synchronize annotations and attributes.