mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 21:51:22 +00:00 
			
		
		
		
	Merge pull request #56483 from vnen/gdscript-warning-annotation
Add annotation to ignore warnings
This commit is contained in:
		
						commit
						6d4ed65f4c
					
				
					 8 changed files with 117 additions and 29 deletions
				
			
		|  | @ -646,6 +646,11 @@ static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_a | |||
| 			ScriptCodeCompletionOption option(E, ScriptCodeCompletionOption::KIND_CLASS); | ||||
| 			r_result.insert(option.display, option); | ||||
| 		} | ||||
| 	} else if (p_annotation->name == "@warning_ignore") { | ||||
| 		for (int warning_code = 0; warning_code < GDScriptWarning::WARNING_MAX; warning_code++) { | ||||
| 			ScriptCodeCompletionOption warning(GDScriptWarning::get_name_from_code((GDScriptWarning::Code)warning_code).to_lower(), ScriptCodeCompletionOption::KIND_PLAIN_TEXT); | ||||
| 			r_result.insert(warning.display, warning); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Rémi Verschelde
						Rémi Verschelde