MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / push_warning

Method push_warning

modules/gdscript/gdscript_parser.cpp:198–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197#ifdef DEBUG_ENABLED
198void GDScriptParser::push_warning(const Node *p_source, GDScriptWarning::Code p_code, const Vector<String> &p_symbols) {
199 ERR_FAIL_NULL(p_source);
200 ERR_FAIL_INDEX(p_code, GDScriptWarning::WARNING_MAX);
201
202 if (is_ignoring_warnings) {
203 return;
204 }
205 if (GLOBAL_GET_CACHED(bool, "debug/gdscript/warnings/exclude_addons") && script_path.begins_with("res://addons/")) {
206 return;
207 }
208 GDScriptWarning::WarnLevel warn_level = (GDScriptWarning::WarnLevel)(int)GLOBAL_GET(GDScriptWarning::get_settings_path_from_code(p_code));
209 if (warn_level == GDScriptWarning::IGNORE) {
210 return;
211 }
212
213 PendingWarning pw;
214 pw.source = p_source;
215 pw.code = p_code;
216 pw.treated_as_error = warn_level == GDScriptWarning::ERROR;
217 pw.symbols = p_symbols;
218
219 pending_warnings.push_back(pw);
220}
221
222void GDScriptParser::apply_pending_warnings() {
223 for (const PendingWarning &pw : pending_warnings) {

Callers 15

resolve_class_memberMethod · 0.45
resolve_class_bodyMethod · 0.45
resolve_annotationMethod · 0.45
resolve_assignableMethod · 0.45
resolve_variableMethod · 0.45
resolve_constantMethod · 0.45
resolve_forMethod · 0.45
resolve_assertMethod · 0.45
resolve_match_patternMethod · 0.45

Calls 2

begins_withMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected