Repository navigation
v2.2.0
Follows XLIDE 10.6.0, from 6.2.0: twelve new diagnostics, early binding checked against the libraries a project references, and member lookups that follow the type library's own extensibility flags. The full list is in CHANGELOG.md.
New checks
invalid-option-statement(error): a malformed Option statement, such asOption Base 2orOption Explicit Foo.missing-library-reference(error): a type or constant qualified with an Office library the project does not reference, such asDim doc As Word.Documentin a workbook with no reference to Word. It is reported only against a known reference list, whichanalyze_office_fileand the CLI read from the container.- Dead code, at
information:unused-variable,variable-never-read,unused-procedureandunreachable-code, with edits that remove the dead code. - Doc comments, at
warning: six checks that compare the XML tags of a'''block with the declaration it documents. - Member calls are checked for arity and argument types, on host objects and project classes alike:
Application.Calculate(1), a bareErr.Raise,p.Save "bad"on a class whoseSavetakes a Long.
Before you upgrade
The CLI's default --fail-level information fails on any diagnostic, so a workbook with one unused variable now exits 1. Pass --fail-level warning to gate on warnings and errors only.
member-not-found reports a member absent from an Excel interface only when the type library closes that interface, as the VBE does. Application.Match and the other worksheet functions reached through Application are no longer reported.
Fixed
False positives 2.1.1 reported on code that compiles, among them: undeclared-variable on XlDirection.xlUp and on a UserForm's own controls, object-variable-not-set on a variable declared As New, member-not-found on a member the type library hides such as ws.OnEntry, readonly-member-assignment on a comparison such as ElseIf w.Part = "b" Then, and event-handler-module-scope on the Document events of Word's ThisDocument.
Verified
Against the upstream analyzer it mirrors. Upstream's own test suite was replayed through the port, 1055 standalone and 929 project calls, every result identical. The oracle corpus (1818 diagnostics), 16 real workbooks, 195 Office files from Excel, Word, PowerPoint and Access, and 693 further projects give identical diagnostics from both analyzers.