Skip to content

OptionBaseInspection

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

Description: Potentially confusing implicit array lower bound

Type: CodeInspectionType.MaintainabilityAndReadabilityIssues

Default severity: CodeInspectionSeverity.Hint

This inspection finds code modules that specify Option Base 1.

Example:

Option Base 1

This code is potentially confusing, because arrays typically have a base index of 0; a maintainer could easily introduce off-by-one bugs when this option is enabled.


QuickFixes

This inspection does not have any quickfix implemented in version 1.2; future versions may include one.

Before Option Base 1 can be safely removed, all implicitly-based array usages must be evaluated to ensure rebasing the array wouldn't introduce off-by-one issues.

Clone this wiki locally