diff options
author | Clay John <claynjohn@gmail.com> | 2022-11-22 10:22:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 10:22:20 -0800 |
commit | 1285e0e21c812ab67882b9ca471200dfc9dc1601 (patch) | |
tree | 27bdb01a2044417864969c966183c36e8945684d /modules/gdscript | |
parent | 0aba659891f5947d9b55ce7c70aa4d7209369717 (diff) | |
parent | 4abbb2d684aa1d7edfcf98a37fe60e9824837d7e (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.cpp | 4 |
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; } |