Warning Reference
Every gateable GDScript warning the analyzer can emit, with its project.godot setting key, engine-default level, and the earliest Godot version it applies to. Configure these under [debug] as gdscript/warnings/<key> (0 = ignore, 1 = warn, 2 = error), or suppress inline with @warning_ignore("<key>"). See Configuration.
| Code | Setting key | Default | Since | Description |
|---|---|---|---|---|
ASSERT_ALWAYS_FALSE | assert_always_false | Warn | 4.3 | An assert(...) condition is always false. |
ASSERT_ALWAYS_TRUE | assert_always_true | Warn | 4.3 | An assert(...) condition is always true. |
CONFUSABLE_CAPTURE_REASSIGNMENT | confusable_capture_reassignment | Warn | 4.3 | A captured variable is reassigned inside a lambda. |
CONFUSABLE_IDENTIFIER | confusable_identifier | Warn | 4.3 | An identifier mixes scripts / uses confusable characters. |
CONFUSABLE_LOCAL_DECLARATION | confusable_local_declaration | Warn | 4.3 | A local is declared after a same-name outer use. |
CONFUSABLE_LOCAL_USAGE | confusable_local_usage | Warn | 4.3 | A local shadowing a member is used before its declaration. |
CONFUSABLE_TEMPORARY_MODIFICATION | confusable_temporary_modification | Warn | master | A temporary value is modified in place. |
CONSTANT_USED_AS_FUNCTION | constant_used_as_function | Warn | 4.3 | A constant is called as if it were a function. |
DEPRECATED_KEYWORD | deprecated_keyword | Warn | 4.3 | A deprecated keyword (e.g. yield) is used. |
EMPTY_FILE | empty_file | Warn | 4.3 | The script file has no members, class_name, or extends. |
ENUM_VARIABLE_WITHOUT_DEFAULT | enum_variable_without_default | Warn | 4.3 | An enum-typed variable has no explicit default value. |
FUNCTION_USED_AS_PROPERTY | function_used_as_property | Warn | 4.3 | A function is accessed as if it were a property. |
GET_NODE_DEFAULT_WITHOUT_ONREADY | get_node_default_without_onready | Error | 4.3 | A get_node(...) default initializer should be @onready. |
INCOMPATIBLE_TERNARY | incompatible_ternary | Warn | 4.3 | The two values of a ternary conditional have no common type. |
INFERENCE_ON_VARIANT | inference_on_variant | Error | 4.3 | A type is inferred from a statically-Variant value. |
INFERRED_DECLARATION | inferred_declaration | Ignore | 4.3 | A declaration uses an inferred type (:=). |
INTEGER_DIVISION | integer_division | Warn | 4.3 | Integer division discards the fractional part. |
INT_AS_ENUM_WITHOUT_CAST | int_as_enum_without_cast | Warn | 4.3 | An integer is assigned to an enum value without a cast. |
INT_AS_ENUM_WITHOUT_MATCH | int_as_enum_without_match | Warn | 4.3 | An integer is compared to an enum value in a match. |
MISSING_AWAIT | missing_await | Ignore | master | An awaitable call's result is not awaited. |
MISSING_TOOL | missing_tool | Warn | 4.3 | A class extends a @tool class but is not itself @tool. |
NARROWING_CONVERSION | narrowing_conversion | Warn | 4.3 | A float is stored into an int, losing precision. |
NATIVE_METHOD_OVERRIDE | native_method_override | Error | 4.3 | A native virtual method is overridden with an incompatible signature. |
ONREADY_WITH_EXPORT | onready_with_export | Error | 4.3 | @onready and @export are used together on one member. |
PROPERTY_USED_AS_FUNCTION | property_used_as_function | Warn | 4.3 | A property is called as if it were a function. |
REDUNDANT_AWAIT | redundant_await | Warn | 4.3 | await is applied to a non-coroutine, non-signal value. |
REDUNDANT_STATIC_UNLOAD | redundant_static_unload | Warn | 4.3 | @static_unload is used on a class with no static variables. |
RETURN_VALUE_DISCARDED | return_value_discarded | Ignore | 4.3 | A non-void call's return value is discarded. |
SHADOWED_GLOBAL_IDENTIFIER | shadowed_global_identifier | Warn | 4.3 | A class_name, member, or local shadows a global identifier. |
SHADOWED_VARIABLE | shadowed_variable | Warn | 4.3 | A local shadows an outer local or parameter. |
SHADOWED_VARIABLE_BASE_CLASS | shadowed_variable_base_class | Warn | 4.3 | A member shadows a member of a base class. |
STANDALONE_EXPRESSION | standalone_expression | Warn | 4.3 | An expression statement has no effect. |
STANDALONE_TERNARY | standalone_ternary | Warn | 4.3 | A ternary conditional is used as a statement; its value is discarded. |
STATIC_CALLED_ON_INSTANCE | static_called_on_instance | Warn | 4.3 | A static method is called through an instance. |
TOO_FEW_ARGUMENTS | too_few_arguments | Error | 4.3 | A call passes fewer arguments than the callee's required parameters (a compile error in Godot). Only statically-resolved signatures are checked. |
TOO_MANY_ARGUMENTS | too_many_arguments | Error | 4.3 | A call passes more arguments than the callee accepts (a compile error in Godot). Variadic callees are never flagged. |
UNASSIGNED_VARIABLE | unassigned_variable | Warn | 4.3 | An untyped or enum-typed local is read before it is assigned a value (a typed local is zero-initialized). |
UNASSIGNED_VARIABLE_OP_ASSIGN | unassigned_variable_op_assign | Warn | 4.3 | A compound assignment (+=, …) is applied to a still-unassigned local. |
UNDEFINED_FUNCTION | undefined_function | Error | 4.3 | A called function is not defined anywhere in the loaded project (a compile error in Godot). Analyzer-specific code; fires only when the loader declared the workspace complete. |
UNDEFINED_IDENTIFIER | undefined_identifier | Error | 4.3 | An identifier is not declared anywhere in the loaded project (a compile error in Godot). Analyzer-specific code; fires only when the loader declared the workspace complete. |
UNDEFINED_METHOD | undefined_method | Error | 4.3 | A method called on a built-in type does not exist on it (a compile error in Godot; the bundled built-in tables are closed, so no completeness claim is needed). |
UNDEFINED_PROPERTY | undefined_property | Error | 4.3 | A property accessed on a built-in type does not exist on it (a compile error in Godot; the bundled built-in tables are closed, so no completeness claim is needed). |
UNREACHABLE_CODE | unreachable_code | Warn | 4.3 | A statement follows an unconditional return/break/continue (or an exhaustive match). |
UNREACHABLE_PATTERN | unreachable_pattern | Warn | 4.3 | A match pattern can never match (it follows a wildcard). |
UNSAFE_CALL_ARGUMENT | unsafe_call_argument | Ignore | 4.3 | An argument needs an unsafe implicit cast into the parameter type. |
UNSAFE_CAST | unsafe_cast | Ignore | 4.3 | A value is cast through Variant, which is unsafe. |
UNSAFE_METHOD_ACCESS | unsafe_method_access | Ignore | 4.3 | A method is not present on the inferred type (but may be on a subtype). |
UNSAFE_PROPERTY_ACCESS | unsafe_property_access | Ignore | 4.3 | A property is not present on the inferred type (but may be on a subtype). |
UNSAFE_VOID_RETURN | unsafe_void_return | Warn | 4.3 | A Variant value is returned from a -> void function. |
UNTYPED_DECLARATION | untyped_declaration | Ignore | 4.3 | A declaration has no type annotation. |
UNUSED_LOCAL_CONSTANT | unused_local_constant | Warn | 4.3 | A local constant is declared but never read. |
UNUSED_PARAMETER | unused_parameter | Warn | 4.3 | A function parameter is never used (prefix it with _). |
UNUSED_PRIVATE_CLASS_VARIABLE | unused_private_class_variable | Warn | 4.3 | A _-prefixed class member is never read within the class. |
UNUSED_SIGNAL | unused_signal | Warn | 4.3 | A signal is never emitted or connected in the file. |
UNUSED_VARIABLE | unused_variable | Warn | 4.3 | A local variable is declared but never read. |