Topic was automatically imported from the old Question2Answer platform.
Asked By
sygi
I am using some code that I don’t want to modify (webrtc example server). It causes a number of warnings that I want to disable only for this file and not for the whole project.
The warning suppression syntax has changed in Godot 4, but it looks like the docs haven’t been updated yet. There is a PR here to do just that.
If you let the editor insert an ignore clause for you (via the yellow warning triangle at the bottom-right edge of the the code panel) you can see the new syntax. Here’s an example to ignore an unused parameter:
@warning_ignore("unused_parameter")
That said, I’m not sure what the new equivalent of the file-level # warnings-disable is (it’s not mentioned in the above linked PR).