Fix a few GDScript warning messages for grammar and consistency

Regenerate test results

Improve warning message for `INT_AS_ENUM_WITHOUT_CAST`

Improve `REDUNDANT_AWAIT` message and regenerate tests

Allow warning message for UNASSIGNED_VARIABLE_OP_ASSIGN to display specific operator

Remove "being" from some messages to make them consistent and clearer

Update expected test results

Use Variant::get_operator_name for determining string representation of operator instead of big switch-case

Update tests

Update modules/gdscript/gdscript_warning.cpp

Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>

Update tests... again
This commit is contained in:
Malcolm Anderson 2025-03-28 09:47:46 -07:00
parent 6a6a1168a5
commit d8db03e31a
11 changed files with 57 additions and 57 deletions

View file

@ -1,11 +1,11 @@
GDTEST_OK
~~ WARNING at line 5: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 6: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 7: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 8: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 9: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 11: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "%" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 12: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 13: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 14: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "%" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 5: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 6: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 7: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 8: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 9: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 11: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "%" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 12: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 13: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
~~ WARNING at line 14: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value uses "%" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.
warn

View file

@ -1,10 +1,10 @@
GDTEST_OK
~~ WARNING at line 26: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 28: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 32: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 38: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 44: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 45: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 46: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 51: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 53: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.
~~ WARNING at line 26: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.
~~ WARNING at line 28: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.
~~ WARNING at line 32: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.
~~ WARNING at line 38: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.
~~ WARNING at line 44: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.
~~ WARNING at line 45: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.
~~ WARNING at line 46: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.
~~ WARNING at line 51: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.
~~ WARNING at line 53: (REDUNDANT_AWAIT) "await" keyword is unnecessary because the expression isn't a coroutine nor a signal.