Install
glua_check runs the same analyzer and diagnostics as the language server. Use it when you want to check a project without opening an editor.
Check a project
Run the command with one or more addon or gamemode folders:.gluarc.json in the workspace and prints diagnostics to the terminal. It exits with code 1 when it finds an error.
To make warnings fail the command too, add --warnings-as-errors:
Load Garry’s Mod API definitions
Pass the generated annotations folder when you runglua_check outside the VS Code extension:
Output formats
The defaulttext output is easy to read in a terminal. Use json for scripts or sarif for code scanning tools:
Useful options
Run
glua_check --help for the complete command reference.