Obsolete Global

Locates legacy 'Global' declaration statements.

 NEW! This inspection is only available in pre-release builds.

Reasoning

The legacy syntax is obsolete; use the 'Public' keyword instead.

Default severity

Suggestion

Inspection type

LanguageOpportunities

QuickFixes

The following quickfixes are available for this inspection:

Examples

This example should trigger a result

MyModule (StandardModule)
Option Explicit Global Foo As Long

This example should NOT trigger a result

MyModule (StandardModule)
Option Explicit Public Foo As Long

Rubberduck.CodeAnalysis.Inspections.Concrete.ObsoleteGlobalInspection.cs (Prerelease-v2.5.2.6174)