diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-05 09:05:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 09:05:56 +0100 |
commit | 6d4ed65f4cba81a1f6c9bec1e8a0d2f543faaeab (patch) | |
tree | fd85df7986fcf273c82194311d66ddf6110fef81 /modules/gdscript/tests | |
parent | b57b2447be2c01516342ae72a77efb012f96f021 (diff) | |
parent | 923b7b27486212786364327235dfe8bead629a5d (diff) |
Merge pull request #56483 from vnen/gdscript-warning-annotation
Add annotation to ignore warnings
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/warning_ignore_annotation.gd | 15 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/warning_ignore_annotation.out | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_annotation.gd b/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_annotation.gd new file mode 100644 index 0000000000..877a4ea221 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_annotation.gd @@ -0,0 +1,15 @@ +@warning_ignore(unused_private_class_variable) +var _unused = 2 + +@warning_ignore(unused_variable) +func test(): + print("test") + var unused = 3 + + @warning_ignore(redundant_await) + print(await regular_func()) + + print("done") + +func regular_func(): + return 0 diff --git a/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_annotation.out b/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_annotation.out new file mode 100644 index 0000000000..42292774a0 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_annotation.out @@ -0,0 +1,4 @@ +GDTEST_OK +test +0 +done |