Overview
@diagnostic controls warnings for one line, the next line, or a block of code. Suppress false positives without disabling diagnostics for your entire addon.
Syntax
disable-next-line
Suppress diagnostics on the next line only:disable-line
Suppress diagnostics on the current line. Place it inline:Block disable/enable
Disable diagnostics for a section, then enable them again:File-wide disable
A---@diagnostic disable with no matching enable suppresses diagnostics for the rest of the file:
Multiple codes
Suppress multiple diagnostics at once:Common codes to suppress
Alternative: configure globally
If you suppress the same diagnostic often, disable it or change its severity in.gluarc.json:
.gluarc.json