Skip to main content
The glua command runs the same parser, analyser and formatter as the extension, so a finding in CI is the same finding you saw in the editor. Use it to gate pull requests, run a pre-commit hook, or format a whole addon in one go.

Installing

Or build it from the repository:

glua lint

Exits 1 when there are errors, or when --max-warnings is exceeded. Otherwise 0.
The whole project gets indexed even when you lint a single file. Cross-file rules — an unhandled net message, a duplicate hook identifier, a missing AddCSLuaFile — are only correct once the index has seen everything.

Output formats

glua fmt

Files that do not parse are skipped and reported, never rewritten. Formatting broken code is how one problem becomes two.

glua rules

Lists every diagnostic code alongside its settings key. Worth knowing because the two are different: net-payload-mismatch is what you suppress inline, netReadWriteMismatch is what you set in .glua.json.

Configuration

The CLI reads exactly the same files as the editor — .glua.json, .gluafmtrc.json, .editorconfig, .prettierrc — resolved from --root or the working directory. See Configuration.

In GitHub Actions

The github format emits workflow annotations, so findings appear inline on the pull request diff.

Colour

Honours NO_COLOR and turns itself off when piped. --no-color disables it explicitly, FORCE_COLOR=1 forces it on through a pipe.