File tree 2 files changed +13
-5
lines changed
tutorials/scripting/gdscript
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,8 @@ def innerstring_rules(ttype):
428
428
"@static_unload" ,
429
429
"@tool" ,
430
430
"@warning_ignore" ,
431
+ "@warning_ignore_restore" ,
432
+ "@warning_ignore_start" ,
431
433
),
432
434
prefix = r"(?<!\.)" ,
433
435
suffix = r"\b" ,
Original file line number Diff line number Diff line change @@ -23,14 +23,20 @@ script editor's status bar. The example below has 2 warnings:
23
23
24
24
.. image :: img/typed_gdscript_warning_example.webp
25
25
26
- To ignore specific warnings in one file, insert an annotation of the
27
- form `` @warning_ignore("warning-id") ``, or click on the ignore link to the
28
- left of the warning's description. Godot will add an annotation above the
29
- corresponding line and the code won't trigger the corresponding warning
30
- anymore:
26
+ To ignore single warnings within a file, use the
27
+ :ref: ` @warning_ignore < class_@GDScript_annotation_@warning_ignore >` annotation.
28
+ You can click on the ignore link to the left of the warning's description.
29
+ Godot will add an annotation above the corresponding line and the code
30
+ won't trigger the corresponding warning anymore:
31
31
32
32
.. image :: img/typed_gdscript_warning_system_ignore.webp
33
33
34
+ To ignore multiple warnings in a region within a file, use the
35
+ :ref: `@warning_ignore_start <class_@GDScript_annotation_@warning_ignore_start >`
36
+ and :ref: `@warning_ignore_restore <class_@GDScript_annotation_@warning_ignore_restore >`
37
+ annotations. You can omit ``@warning_ignore_restore `` if you want to ignore
38
+ the specified warning types until the end of the file.
39
+
34
40
Warnings won't prevent the game from running, but you can turn them into
35
41
errors if you'd like. This way your game won't compile unless you fix
36
42
all warnings. Head to the ``GDScript `` section of the Project Settings to
You can’t perform that action at this time.
0 commit comments