diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2023-02-10 10:16:33 +0300 |
---|---|---|
committer | Danil Alexeev <danil@alexeev.xyz> | 2023-02-10 10:16:33 +0300 |
commit | 220898a69f832cb06de341bcbfef59a5c47586ac (patch) | |
tree | f1f07e8dd75c535eff1f4831260d52b25cc97105 | |
parent | 929ee61170ec4d431d6d2cfeddccdec2a59a11b7 (diff) |
GDScript: Remove `treat_warnings_as_errors` project setting
-rw-r--r-- | doc/classes/ProjectSettings.xml | 3 | ||||
-rw-r--r-- | modules/gdscript/gdscript.cpp | 1 | ||||
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 2 |
3 files changed, 1 insertions, 5 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index c30747eac1..21be5e4bee 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -474,9 +474,6 @@ <member name="debug/gdscript/warnings/static_called_on_instance" type="int" setter="" getter="" default="1"> When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a static method from an instance of a class instead of from the class directly. </member> - <member name="debug/gdscript/warnings/treat_warnings_as_errors" type="bool" setter="" getter="" default="false"> - If [code]true[/code], all warnings will be reported as if they are errors. - </member> <member name="debug/gdscript/warnings/unassigned_variable" type="int" setter="" getter="" default="1"> When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when using a variable that wasn't previously assigned. </member> diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index a876229276..fe79f37454 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -2578,7 +2578,6 @@ GDScriptLanguage::GDScriptLanguage() { #ifdef DEBUG_ENABLED GLOBAL_DEF("debug/gdscript/warnings/enable", true); - GLOBAL_DEF("debug/gdscript/warnings/treat_warnings_as_errors", false); GLOBAL_DEF("debug/gdscript/warnings/exclude_addons", true); for (int i = 0; i < (int)GDScriptWarning::WARNING_MAX; i++) { GDScriptWarning::Code code = (GDScriptWarning::Code)i; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 42e1f27603..b5cb5a4680 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -175,7 +175,7 @@ void GDScriptParser::push_warning(const Node *p_source, GDScriptWarning::Code p_ warning.leftmost_column = p_source->leftmost_column; warning.rightmost_column = p_source->rightmost_column; - if (warn_level == GDScriptWarning::WarnLevel::ERROR || bool(GLOBAL_GET("debug/gdscript/warnings/treat_warnings_as_errors"))) { + if (warn_level == GDScriptWarning::WarnLevel::ERROR) { push_error(warning.get_message() + String(" (Warning treated as error.)"), p_source); return; } |