UNUSED_SIGNAL is emitted when emit_signal is not called explicitely. Should that change ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Alikae

Hi there.

When forwarding a signal using ‘connect’, the linter trigger the UNUSED_SIGNAL warning.


extends Node
signal sig()

func _ready():
    var _err = $Node.connect("child_sig", self, 'emit_signal', ['sig'])

I understand that the linter doesn’t see any emit_signal call, but the warning is a false positive in this case.
Is that the ‘wanted’ behavior ?
Should I create a Github issue on the subject ?

:bust_in_silhouette: Reply From: Gluon

There is already a github discussion on this

It was determined that the error can come up erroneously but it doesnt stop a program from running and there is no easy way to fix it without just removing the warning. Some cases however of this warning will be legitimate so it was left in.