diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 10:54:22 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 10:54:22 +0100 |
commit | afe3b94ab28a28d562fd96f3daf41a22cb26757a (patch) | |
tree | 1b2e0cfc8e529ae652f79c286495527883581fa6 /modules/gdscript/tests/scripts/analyzer/warnings | |
parent | f7397a5ac6bffc0df24cae61b8aabfa4a3b65347 (diff) |
Revert "GDScript: Add warnings that are set to error by default"
This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396.
This caused multiple regressions.
Needs to be redone with more testing before merge.
Fixes #72501.
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/warnings')
8 files changed, 0 insertions, 64 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.gd b/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.gd deleted file mode 100644 index bf5ea241ec..0000000000 --- a/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.gd +++ /dev/null @@ -1,15 +0,0 @@ -extends Node - -var add_node = do_add_node() # Hack to have one node on init and not fail at runtime. - -var shorthand = $Node -var with_self = self.get_node("Node") -var without_self = get_node("Node") - -func test(): - print("warn") - -func do_add_node(): - var node = Node.new() - node.name = "Node" - add_child(node) diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.out b/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.out deleted file mode 100644 index 11cd9c678b..0000000000 --- a/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.out +++ /dev/null @@ -1,14 +0,0 @@ -GDTEST_OK ->> WARNING ->> 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 ->> 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 ->> 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. -warn diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.gd b/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.gd deleted file mode 100644 index 024e91b7c6..0000000000 --- a/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.gd +++ /dev/null @@ -1,6 +0,0 @@ -func test(): - var inferred_with_variant := return_variant() - print(inferred_with_variant) - -func return_variant() -> Variant: - return "warn" diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.out b/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.out deleted file mode 100644 index 1d4078d2f7..0000000000 --- a/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_OK ->> WARNING ->> Line: 2 ->> INFERENCE_ON_VARIANT ->> The variable type is being inferred from a Variant value, so it will be typed as Variant. -warn diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.gd b/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.gd deleted file mode 100644 index 0b358ca5f2..0000000000 --- a/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.gd +++ /dev/null @@ -1,6 +0,0 @@ -extends Node - -@onready @export var conflict = "" - -func test(): - print("warn") diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.out b/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.out deleted file mode 100644 index ff184f9f04..0000000000 --- a/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_OK ->> WARNING ->> Line: 3 ->> ONREADY_WITH_EXPORT ->> The "@onready" annotation will make the default value to be set after the "@export" takes effect and will override it. -warn diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.gd b/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.gd deleted file mode 100644 index 19d40f8ec8..0000000000 --- a/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.gd +++ /dev/null @@ -1,5 +0,0 @@ -func test(): - print("warn") - -func get(_property: StringName) -> Variant: - return null diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.out b/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.out deleted file mode 100644 index 793faa05d4..0000000000 --- a/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.out +++ /dev/null @@ -1,6 +0,0 @@ -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. -warn |