diff options
author | George Marques <george@gmarqu.es> | 2022-01-04 09:32:43 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2022-01-04 09:32:43 -0300 |
commit | fd643c903dd3bb1a502d0f91576e51afeb7f29e2 (patch) | |
tree | a80d1f63ca5218ab3b2a8edc985de4ced4bfcfec /modules/gdscript/tests/scripts/analyzer/features | |
parent | 1032c2c434ec882905b1ab2426d8ce3043dd6958 (diff) |
GDScript: Add annotation to ignore warnings
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/features')
-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 |