godot-gdscript-toolkit
godot-gdscript-toolkit copied to clipboard
New Lint rule: check node paths
trafficstars
I'm not sure if there is a CLI tool yet for that, but I would like to check that my project does not miss any path or has an incorrect path in use.
So I would like to prevent:
- having a node path like
@onready var timer: Timer = $Timer, but then $Timer does not exists this would need to check the .tscn file :thinking: - even further, check if the file really exists in the system
so when I have a
res://assets/my_asset.png, but there is not my_asset.png, show an error
I accidentally missed to check in a file e.g. here:
- https://github.com/Shinigami92/ore-seeker/pull/12/files#diff-5e9f36cc843c59459f7dba39fa931ce58d38a76ad834f286f793f7ec13b2ae9bR4
and then fixed it with an additional commit:
- https://github.com/Shinigami92/ore-seeker/commit/e0fb4d3a8f017d9e00694bdc15c1e4ee15a07385
That would require some high-level linter that would take the entire project as input. I've been thinking about it already. Anyway, that's the future.