Table of Contents

RDC00213: Line continuation between keywords

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

A keyword of two words, such as End If or Exit Sub, is split over several lines with a line continuation.

A line continuation is white space (MS-VBAL §3.3 Lexical Tokens), so it can stand between the two words of a keyword, and the code is legal VBA. A keyword split this way is hard to read: End at the end of one line reads as an End statement.

The finding is the line continuations of the keyword. A line continuation in a comment continues the comment, and is not reported.

How it is raised

Situation Example Resolution
A line continuation between the words of a keyword. End _
If
Write the keyword on one line: End If.

Quick fix

The diagnostic comes with a quick fix, Write '…' on one line. It puts one space between the words of the keyword in place of the line continuations. The code does the same.

See also


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