Skip to main content

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:
Use the settings menu instead of editing the JSON file directly. This helps you avoid config mistakes.
.gluarc.json
Use the interactive settings panel to toggle diagnostics and change severity with checkboxes and dropdowns. You do not need to edit 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.

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:
See the @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:
Use the settings menu instead of editing the JSON file directly. This helps you avoid config mistakes.
.gluarc.json