You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add opt-in GDScript warning for when calling coroutine without await
This commit is contained in:
@@ -118,6 +118,8 @@ String GDScriptWarning::get_message() const {
|
||||
return R"(The "@static_unload" annotation is redundant because the file does not have a class with static variables.)";
|
||||
case REDUNDANT_AWAIT:
|
||||
return R"("await" keyword is unnecessary because the expression isn't a coroutine nor a signal.)";
|
||||
case MISSING_AWAIT:
|
||||
return R"("await" keyword might be desired because the expression is a coroutine.)";
|
||||
case ASSERT_ALWAYS_TRUE:
|
||||
return "Assert statement is redundant because the expression is always true.";
|
||||
case ASSERT_ALWAYS_FALSE:
|
||||
@@ -221,6 +223,7 @@ String GDScriptWarning::get_name_from_code(Code p_code) {
|
||||
PNAME("MISSING_TOOL"),
|
||||
PNAME("REDUNDANT_STATIC_UNLOAD"),
|
||||
PNAME("REDUNDANT_AWAIT"),
|
||||
PNAME("MISSING_AWAIT"),
|
||||
PNAME("ASSERT_ALWAYS_TRUE"),
|
||||
PNAME("ASSERT_ALWAYS_FALSE"),
|
||||
PNAME("INTEGER_DIVISION"),
|
||||
|
||||
Reference in New Issue
Block a user