Просмотр исходного кода

Document all comments that disable warnings

These are the 3 types that I found in the code:

- # warning-ignore:id_of_warning
- # warning-ignore-all:id_of_warning
- # warnings-disable

I found them at https://github.com/godotengine/godot/blob/24e1039eb6fe32115e8d1a62a84965e9be19a2ed/modules/gdscript/gdscript_tokenizer.cpp#L558
If there are any more they should also be added.
Kaligule 5 лет назад
Родитель
Сommit
97b8ad885b
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      getting_started/scripting/gdscript/static_typing.rst

+ 5 - 1
getting_started/scripting/gdscript/static_typing.rst

@@ -327,7 +327,7 @@ script editor’s status bar. The example below has 3 warnings:
    warning system example
 
 To ignore specific warnings in one file, insert a special comment of the
-form ``#warning-ignore:warning-id``, or click on the ignore link to the
+form ``# warning-ignore:warning-id``, or click on the ignore link to the
 right of the warning’s description. Godot will add a comment above the
 corresponding line and the code won’t trigger the corresponding warning
 anymore:
@@ -337,6 +337,10 @@ anymore:
 
    warning system ignore example
 
+You can also choose to ignore not just one but all warnings of a certain
+type in this file with ``# warning-ignore-all:warning-id``. To ignore all
+warnings of all types in a file add the comment ``# warnings-disable`` to it.
+
 Warnings won’t prevent the game from running, but you can turn them into
 errors if you’d like. This way your game won’t compile unless you fix
 all warnings. Head to the ``GDScript`` section of the Project Settings to