Implemented Interface Member

Identifies class modules that define an interface with one or more members containing a concrete implementation.

Reasoning

Interfaces provide an abstract, unified programmatic access to different objects; concrete implementations of their members should be in a separate module that 'Implements' the interface.

Default severity

Suggestion

Inspection type

CodeQualityIssues

Examples

This example should NOT trigger a result

MyModule (ClassModule)
Option Explicit '@Interface Public Sub DoSomething() ' empty interface stub End Sub

This example should trigger a result

MyModule (ClassModule)
Option Explicit '@Interface Public Sub DoSomething() MsgBox "Hello from interface!" End Sub

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