You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
GDScript: Warn when enum variable has no default
The default will always be set to `0`, so if it's not a valid value in the enum, the warning is shown.
This commit is contained in:
@@ -78,6 +78,7 @@ public:
|
||||
NARROWING_CONVERSION, // Float value into an integer slot, precision is lost.
|
||||
INT_AS_ENUM_WITHOUT_CAST, // An integer value was used as an enum value without casting.
|
||||
INT_AS_ENUM_WITHOUT_MATCH, // An integer value was used as an enum value without matching enum member.
|
||||
ENUM_VARIABLE_WITHOUT_DEFAULT, // A variable with an enum type does not have a default value. The default will be set to `0` instead of the first enum value.
|
||||
EMPTY_FILE, // A script file is empty.
|
||||
DEPRECATED_KEYWORD, // The keyword is deprecated and should be replaced.
|
||||
RENAMED_IN_GODOT_4_HINT, // A variable or function that could not be found has been renamed in Godot 4.
|
||||
@@ -129,6 +130,7 @@ public:
|
||||
WARN, // NARROWING_CONVERSION
|
||||
WARN, // INT_AS_ENUM_WITHOUT_CAST
|
||||
WARN, // INT_AS_ENUM_WITHOUT_MATCH
|
||||
WARN, // ENUM_VARIABLE_WITHOUT_DEFAULT
|
||||
WARN, // EMPTY_FILE
|
||||
WARN, // DEPRECATED_KEYWORD
|
||||
WARN, // RENAMED_IN_GODOT_4_HINT
|
||||
|
||||
Reference in New Issue
Block a user