Skip to content

MultipleDeclarationsInspection

Max Dörner edited this page Jun 2, 2019 · 3 revisions

Description: Instruction contains multiple declarations

Type: CodeInspectionType.MaintainabilityAndReadabilityIssues

Default severity: CodeInspectionSeverity.Suggestion

This inspection finds instructions that declare multiple identifiers.

Example:

This instruction declares multiple identifiers:

Dim foo As Integer, bar As Integer

Although it's allowed by the language, declaring multiple identifiers on the same instruction often makes the code harder to read and to maintain.


QuickFixes

QuickFix: Separate multiple declarations into multiple instructions

Dim foo As Integer
Dim bar As Integer

By declaring a single variable per instruction, a maintainer can more easily locate where a variable is declared.

Clone this wiki locally