diff options
author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-02-05 16:00:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-05 16:00:26 +0300 |
commit | 13f0158e49676fc5ec8694a40261685596faa3d1 (patch) | |
tree | 89338da40628963d917e09492d8e9b7cacb6c0b9 /modules/gdscript/tests/gdscript_test_runner.cpp | |
parent | e13e4b7b6df3557a973af525e4c925faf33b55c5 (diff) | |
parent | 273bf7210f44bc6ea729b44fb167716340ad7dff (diff) |
Merge pull request #72608 from vnen/gdscript-warning-default-error
GDScript: Add warnings that are set to error by default (take 2)
Diffstat (limited to 'modules/gdscript/tests/gdscript_test_runner.cpp')
-rw-r--r-- | modules/gdscript/tests/gdscript_test_runner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp index 5b8af0ff34..57405aa1ce 100644 --- a/modules/gdscript/tests/gdscript_test_runner.cpp +++ b/modules/gdscript/tests/gdscript_test_runner.cpp @@ -146,11 +146,11 @@ GDScriptTestRunner::GDScriptTestRunner(const String &p_source_dir, bool p_init_l init_language(p_source_dir); } #ifdef DEBUG_ENABLED - // Enable all warnings for GDScript, so we can test them. + // 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++) { - String warning = GDScriptWarning::get_name_from_code((GDScriptWarning::Code)i).to_lower(); - ProjectSettings::get_singleton()->set_setting("debug/gdscript/warnings/" + warning, true); + String warning_setting = GDScriptWarning::get_settings_path_from_code((GDScriptWarning::Code)i); + ProjectSettings::get_singleton()->set_setting(warning_setting, (int)GDScriptWarning::WARN); } #endif |