Merge pull request #76412 from dalexeev/gds-reorganize-warnings

GDScript: Reorganize and unify warnings
This commit is contained in:
Rémi Verschelde 2023-04-28 18:45:48 +02:00
commit f37fc4e708
No known key found for this signature in database
GPG key ID: C3336907360768E1
22 changed files with 175 additions and 212 deletions

View file

@ -2,7 +2,7 @@ GDTEST_OK
>> WARNING
>> Line: 20
>> UNSAFE_VOID_RETURN
>> The method 'return_side_effect()' returns 'void' but it's trying to return a call to 'side_effect()' that can't be ensured to also be 'void'.
>> The method "return_side_effect()" returns "void" but it's trying to return a call to "side_effect()" that can't be ensured to also be "void".
hello
effect
effect

View file

@ -2,5 +2,5 @@ GDTEST_OK
>> WARNING
>> Line: 6
>> UNSAFE_METHOD_ACCESS
>> The method 'free' is not present on the inferred type 'Variant' (but may be present on a subtype).
>> The method "free()" is not present on the inferred type "Variant" (but may be present on a subtype).
Ok

View file

@ -2,4 +2,4 @@ GDTEST_OK
>> WARNING
>> Line: 2
>> UNUSED_PARAMETER
>> The parameter 'unused' is never used in the function ''. If this is intended, prefix it with an underscore: '_unused'
>> The parameter "unused" is never used in the function "<anonymous lambda>()". If this is intended, prefix it with an underscore: "_unused".

View file

@ -2,5 +2,5 @@ GDTEST_OK
>> WARNING
>> Line: 4
>> NATIVE_METHOD_OVERRIDE
>> The method "get" overrides a method from native class "Object". This won't be called by the engine and may not work as expected.
>> The method "get()" overrides a method from native class "Object". This won't be called by the engine and may not work as expected.
warn

View file

@ -2,19 +2,19 @@ GDTEST_OK
>> WARNING
>> Line: 5
>> SHADOWED_GLOBAL_IDENTIFIER
>> The variable 'Array' has the same name as a built-in type.
>> The variable "Array" has the same name as a built-in type.
>> WARNING
>> Line: 6
>> SHADOWED_GLOBAL_IDENTIFIER
>> The variable 'Node' has the same name as a global class.
>> The variable "Node" has the same name as a global class.
>> WARNING
>> Line: 7
>> SHADOWED_GLOBAL_IDENTIFIER
>> The variable 'is_same' has the same name as a built-in function.
>> The variable "is_same" has the same name as a built-in function.
>> WARNING
>> Line: 8
>> SHADOWED_GLOBAL_IDENTIFIER
>> The variable 'sqrt' has the same name as a built-in function.
>> The variable "sqrt" has the same name as a built-in function.
>> WARNING
>> Line: 9
>> SHADOWED_VARIABLE