Obsolete Call Statement

Locates explicit 'Call' statements.

Reasoning

The 'Call' keyword is obsolete and redundant, since call statements are legal and generally more consistent without it.

Default severity

Suggestion

Inspection type

LanguageOpportunities

Examples

This example should trigger a result

MyModule (StandardModule)
Public Sub Test() Call DoSomething(42) End Sub Private Sub DoSomething(ByVal foo As Long) ' ... End Sub

This example should NOT trigger a result

MyModule (StandardModule)
Public Sub Test() DoSomething 42 End Sub Private Sub DoSomething(ByVal foo As Long) ' ... End Sub

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