Skip to content

VBAlidator

Premium VBA static analyser & compile-safety prechecker — designed from the ground up to validate AI-generated VBA before it ever reaches a production workbook.

PyPI CI Docker

VBAlidator parses .bas / .cls / .frm files, walks them through a proper lexer / preprocessor / parser / analyzer pipeline, and emits a 0–100 confidence score plus a stable JSON v2 report you can drop straight into any CI pipeline or LLM-VBA validator stack.

Why VBAlidator

  • AI-grade prechecker. Catches the typical hallucinations of LLM-VBA generators — wrong arity, missing Set, hallucinated method names, missing PtrSafe, type-mismatched literals — before VBE ever sees the code.
  • Optional dynamic verification. With --roundtrip (Windows + Office) the static analyser is cross-checked against the actual VBE compiler.
  • Bundled host models + auto-layering. --host excel|word|access|outlook|visio ships the matching Office object model (Excel/Word/Access/Visio are full-fidelity, 1–3 MB each). Six COM companion stubs (mscomctl/msforms/scripting/ vbscript_regexp/wscript_shell/shell_application) auto-layer on top whenever the scan set mentions their ProgID — no extra flag.
  • Stable rule IDs. Every finding carries a VBA<id> you can pin in CI ignore lists. The catalogue at Rules documents each one with a Failing example, a Compliant example and a fix hint.
  • CI-ready. Confidence-Score, JSON v2 report, Docker image, Conventional-Commit-driven semantic releases on PyPI and GHCR.

In one line

pip install vbalidator
vbalidator ./MyModules --host excel

In one Python call

from vbalidator import precheck

result = precheck("Module1.bas", host="excel")
if not result.compile_safe:
    for err in result.errors:
        print(f"{err['rule_id']}: {err['message']}")
print(f"score = {result.score}/100")

Where to next