Invalid Annotation

Flags invalid or misplaced Rubberduck annotation comments.

Reasoning

Rubberduck is correctly parsing an annotation, but that annotation is illegal in that context and couldn't be bound to a code element.

Default severity

Warning

Inspection type

CodeQualityIssues

Examples

This example should trigger a result

MyModule (StandardModule)
Option Explicit Public Sub DoSomething() '@Folder("Module1.DoSomething") Dim foo As Long End Sub

This example should NOT trigger a result

MyModule (StandardModule)
'@Folder("Module1.DoSomething") Option Explicit Public Sub DoSomething() Dim foo As Long End Sub

Rubberduck.CodeAnalysis.Inspections.Concrete.InvalidAnnotationInspection.cs (Prerelease-v2.5.9.6289)