Rubberduck icon indicating copy to clipboard operation
Rubberduck copied to clipboard

Locate invalid (too long) identifiers

Open retailcoder opened this issue 8 years ago • 0 comments

The grammar doesn't enforce maximum identifier lengths (see #2855), yet we assume that no parser error means the code is compilable.

We need an error-level inspection result to pop for every identifier name that's longer than 255 characters - longer than 31 if it's a module name.

Identifier name is too long. VBA will not compile code that contains identifiers longer than 255 characters, or module names longer than 31 characters.

Quickfix is obviously to run a rename refactoring there.


NOTE: This inspection is of limited use in the current shape/structure of code inspections, but after the inspections are restructured, it will be easy to display error-level inspections in the code explorer and/or in the Rubberduck commandbar (hmm, perhaps we'll need to resurrect the defunct Inspections commandbar), or even in the code pane itself (RD 3.0).

retailcoder avatar Mar 13 '17 17:03 retailcoder