Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for #warning-ignore and friends #3447

Open
snoopdouglas opened this issue Apr 25, 2020 · 5 comments
Open

Documentation for #warning-ignore and friends #3447

snoopdouglas opened this issue Apr 25, 2020 · 5 comments
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features enhancement

Comments

@snoopdouglas
Copy link
Contributor

snoopdouglas commented Apr 25, 2020

Your Godot version: 3.2

Issue description:

TLDR: document #warning-ignore, #warning-ignore-all and #warnings-disable.

Apologies if there's already an issue or two out there for this; I've trawled issues for both this repo and the engine's (both open and closed), and haven't been able to find anything.

So yeah, I can't find any reference documentation on the above warning exemptions. (I don't even know if there's an official term for them!)

From what I can see, the only places in the documentation where they're mentioned are:

With some creative searching, I've been able to produce this list from the in-editor docs:

Screenshot from 2020-04-25 22-53-16

However, using those identifiers doesn't always seem to work:

Screenshot from 2020-04-25 22-48-10

Screenshot from 2020-04-25 22-58-22

@snoopdouglas
Copy link
Contributor Author

snoopdouglas commented Apr 25, 2020

I've found a way to fix the above, but in the process have discovered some weird behaviour on this that I'm going to note here for anyone who might pick this up:

Screenshot from 2020-04-25 23-09-50

  • If you break the rules twice on one line, you have to put two consecutive warning exemption lines (see below)!

Screenshot from 2020-04-25 23-08-26

  • The docs all put a space after the #, but this is actually not required.
  • As you can see above, indentation is ignored (though this is what I'd expect with anything involving a comment).

@snoopdouglas
Copy link
Contributor Author

I've just realised the warning triangle, when clicked, provides the facility to ignore warnings. This isn't mentioned anywhere in the docs though; the closest the static typing tutorial comes is:

Screenshot from 2020-04-26 00-12-49

@Calinou
Copy link
Member

Calinou commented Jun 15, 2020

PS: The warning list's "ignore" button has been made more prominent in godotengine/godot#39009.

@Mickeon
Copy link
Contributor

Mickeon commented Nov 12, 2022

@warning_ignore is also an annotation in 4.0. It also comes with its own explanation and tutorial.

@skyace65 skyace65 added content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features area:manual Issues and PRs related to the Manual/Tutorials section of the documentation labels Dec 31, 2022
@hsandt
Copy link
Contributor

hsandt commented May 18, 2023

I tried #warning-ignore:integer_division (also integer-division, #warning-ignore-all, # warnings-disable) and none worked in Godot 4.0.2.

However, the new @warning_ignore("integer_division") works!

This means the doc at https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/warning_system.html and any other page using the old #warning are outdated (unless we want to support the older syntax and it's a bug that it doesn't work, but even then we should recommend using the new one).

So while this issue would make sense for Godot 3 in retrospective, Godot 4 doc should always mention @warning_ignore and any variants (but I could only find this one).

Note: https://docs.godotengine.org/en/stable/classes/class_@gdscript.html mentions @warning_ignore but links to https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/warning_system.html which doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features enhancement
Projects
None yet
Development

No branches or pull requests

5 participants