Overview
Diagnostics appear as squiggly underlines in the editor and in the Problems panel (Ctrl+Shift+M). Each diagnostic has a severity level and a code identifier you can use for configuration.
Severity levels
Configuring diagnostic severity
Change the severity of any diagnostic code, or disable it:.gluarc.json
Diagnostic reference
Type checking
need-check-nil and unchecked-nil-access understand validity guards such as IsValid and annotated guard wrappers. See Guard metadata for custom wrappers.
missing-fields and missing-parameter skip anything with a documented default. Write ---@field clipSize number = 30 or ---@param times number = 1 when a base class, a setup function, or the function itself fills the value in. See @field and @param.
Code quality
Documentation
Access control
Garry’s Mod Lua
Network checks also work through aliases and wrappers around the standard GMod network functions. See Network analysis for examples and settings.Suppressing individual diagnostics
Use---@diagnostic annotations to suppress warnings for specific lines or blocks:
@diagnostic annotation reference for full details.
Global whitelist
Add globals that your code uses but GLuaLS does not know about, such as globals from a module loaded by another file:.gluarc.json