summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorClay John <claynjohn@gmail.com>2022-11-22 10:22:20 -0800
committerGitHub <noreply@github.com>2022-11-22 10:22:20 -0800
commit1285e0e21c812ab67882b9ca471200dfc9dc1601 (patch)
tree27bdb01a2044417864969c966183c36e8945684d /modules/gdscript
parent0aba659891f5947d9b55ce7c70aa4d7209369717 (diff)
parent4abbb2d684aa1d7edfcf98a37fe60e9824837d7e (diff)
Merge pull request #69002 from akien-mga/gdscript-disable-warning-RETURN_VALUE_DISCARDED
GDScript: Don't warn about RETURN_VALUE_DISCARDED by default
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_warning.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_warning.cpp b/modules/gdscript/gdscript_warning.cpp
index 2548d26e14..36bc051643 100644
--- a/modules/gdscript/gdscript_warning.cpp
+++ b/modules/gdscript/gdscript_warning.cpp
@@ -171,6 +171,10 @@ int GDScriptWarning::get_default_value(Code p_code) {
if (get_name_from_code(p_code).to_lower().begins_with("unsafe_")) {
return WarnLevel::IGNORE;
}
+ // Too spammy by default on common cases (connect, Tween, etc.).
+ if (p_code == RETURN_VALUE_DISCARDED) {
+ return WarnLevel::IGNORE;
+ }
return WarnLevel::WARN;
}