summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-12 08:49:57 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-12 08:49:57 +0200
commit0545ed5c7112387b2ee5b4b1998c262df8d061d3 (patch)
treed2ad72d3ff26406398941cc9a10b1736a1170119 /modules/gdscript/tests
parentb539bfb2638eef872a8760c953841ef8e6630991 (diff)
parent14edf044afe54cfe3dced73b83e96e9112581511 (diff)
downloadredot-engine-0545ed5c7112387b2ee5b4b1998c262df8d061d3.tar.gz
Merge pull request #81355 from ryanabx/features/enforce-static-typing
Add an optional `untyped_declaration` warning
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r--modules/gdscript/tests/gdscript_test_runner.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp
index 874cbc6ee8..01772a2e38 100644
--- a/modules/gdscript/tests/gdscript_test_runner.cpp
+++ b/modules/gdscript/tests/gdscript_test_runner.cpp
@@ -149,6 +149,10 @@ GDScriptTestRunner::GDScriptTestRunner(const String &p_source_dir, bool p_init_l
// Set all warning levels to "Warn" in order to test them properly, even the ones that default to error.
ProjectSettings::get_singleton()->set_setting("debug/gdscript/warnings/enable", true);
for (int i = 0; i < (int)GDScriptWarning::WARNING_MAX; i++) {
+ if (i == GDScriptWarning::UNTYPED_DECLARATION) {
+ // TODO: Add ability for test scripts to specify which warnings to enable/disable for testing.
+ continue;
+ }
String warning_setting = GDScriptWarning::get_settings_path_from_code((GDScriptWarning::Code)i);
ProjectSettings::get_singleton()->set_setting(warning_setting, (int)GDScriptWarning::WARN);
}