Table of Contents

RDC00315: Redundant module option

Severity: Information  ·  Family: RDC (Rubberduck Core analyzers)  ·  Raised by: RedundantModuleOptionAnalyzer

A module states Option Base 0 or Option Compare Binary.

A module that states no Option Base gives its arrays a lower bound of 0, and a module that states no Option Compare compares text as binary (MS-VBAL §5.2.1 Option Directives). Either option states what the module has without it.

Option Base 1 is RDC00102. Option Compare Text, Option Explicit and Option Private Module are not reported.

The finding is the directive.

How it is raised

Situation Example Resolution
Option Base 0. Option Base 0 Remove the directive.
Option Compare Binary. Option Compare Binary Remove the directive.

Quick fix

The diagnostic comes with a quick fix, Remove Option Base 0 or Remove Option Compare Binary. It removes the line of the directive, and the module has the same option. It is not offered when the directive shares its line with another one or with a comment.

See also


ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca