You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up from typed GDScript (#10630, #19264), one thing that a lot of people seems to be missing is to detect type-errors more thoroughly than what the type hints can provide.
My proposal is to make a full project static analyzer tool. The idea is that it runs the whole project and look at the scripts in the context where they are attached to nodes in the scene. It would look not only to scripts themselves but also all the scenes and resources and how the relate to each other.
This is not a thing to be used all the time and would be triggered manually, so it doesn't need to be fast. It would be used only before exporting or after a big refactoring.
There are some potential errors that it could catch:
Script refers to a non-existent node in the scene (which can happen when deleting nodes / reorganizing the tree).
Script refers to a non-existent method/property in the node (which can happen in a change type operation).
Script does not inherit the object type it's attached to (can happen when changing type, but also when inheriting another script).
Wrong arguments declared in a function connected to a signal (both arity and types).
Orphan resources (there's already a tool for that, but could be replaced by this one).
Scenes pointing to non-existing resources (can happen when messing with the file-system outside of Godot, sometimes even inside).
Scenes setting resources of wrong type to properties (hard to happen but also hard to catch).
Among many other things, in particular about the scripts since they can be target of many checks if we can spare performance.
The text was updated successfully, but these errors were encountered:
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.
The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.
If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!
Following up from typed GDScript (#10630, #19264), one thing that a lot of people seems to be missing is to detect type-errors more thoroughly than what the type hints can provide.
My proposal is to make a full project static analyzer tool. The idea is that it runs the whole project and look at the scripts in the context where they are attached to nodes in the scene. It would look not only to scripts themselves but also all the scenes and resources and how the relate to each other.
This is not a thing to be used all the time and would be triggered manually, so it doesn't need to be fast. It would be used only before exporting or after a big refactoring.
There are some potential errors that it could catch:
Among many other things, in particular about the scripts since they can be target of many checks if we can spare performance.
The text was updated successfully, but these errors were encountered: