| Tool | Scope | Command | Config |
|---|---|---|---|
| selene | Lua lint | selene . | selene.toml (excludes Libs/) |
| StyLua | Lua format | stylua . | stylua.toml + .styluaignore |
| Biome | JSON lint/format | biome check . | biome.json (JSON only) |
| Lua Language Server | Editor diagnostics | lua-language-server --check . | .luarc.json |
.worktrees/ scratch repository copies are excluded from both Selene and Biome scans, so root verification does not lint duplicate repositories.
Install
Verify after every change
Run the checks relevant to the files you touched before claiming work is done:- All invoked checks must pass (exit 0). Fix and re-run on failure.
- Use
stylua --check(notstylua .) so verification never silently rewrites files.
scripts/verify.sh runs the required static checks, and scripts/core-concat.sh verifies Gatherer core re-slices (strip each file’s header, concatenate bodies in load order, and diff against the previous combined source).
Editor diagnostics
.luarc.json configures the VS Code Lua extension (sumneko.lua) for a warning-free Problems panel:
- Pins
runtime.versionto Lua 5.1 and ignoresLibs/and tooling directories. - Declares the WoW + WGG runtime API and the bot’s shared globals in
diagnostics.globals— this resolves ~1800 false positives while keepingundefined-global,lowercase-global, anddeprecatedenabled, so genuine typos are still caught. - Only the type-inference diagnostic family (which needs full WoW/WGG type signatures, not just names) and the global-sharing
unused-*hints stay disabled. types/wow.luais an editor-only---@metastub (not inloadorder.json) defining theFrame/Buttonwidget types used by---@returnannotations.
When you call a new WoW/WGG global or add an intentional shared global, add its name to
diagnostics.globals in .luarc.json. This includes Gatherer helpers that are read across files because the core loads top-to-bottom. Verify with lua-language-server --check . — it should report “no problems found”..png?fit=max&auto=format&n=yZatCT6YQ7S22QWv&q=85&s=bb502db827d4362d1268445c3b70d21d)