Format

#pragma <warn|ignore|error> WarningName

Changes the way the compiler responds to warnings (except those caused by the #warn directive). The warning name appears in the compiler output when the warning is generated.

Multiple warning names can be used in the same pragma, separated by commas.

// temporarily ignore the unused_var warning
#pragma push
#pragma ignore unused_var
 
proc/GNDN()
    var/nothing // var defined but not used
 
#pragma pop

Here is a list of warnings that are disabled by default, but can be turned on for linting purposes:

NameDescription
init_procA var in a very commonly used type, like /turf or /atom or /datum, is being initialized with an init proc. An example is var/stuff[] or var/list/stuff = list(1,2,3) which creates a list in a special internal proc because calling New(). Best practice is to not initialize the list until it’s needed.
frequent_callA very commonly called proc such as New() or Del() has been overridden on a type that gets created or destroyed frequently, such as /turf, /atom, or /datum.

See also