godot-gdscript-toolkit icon indicating copy to clipboard operation
godot-gdscript-toolkit copied to clipboard

New Lint rule: check node paths

Open Shinigami92 opened this issue 2 years ago • 1 comments
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:

  1. 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:
  2. 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

Shinigami92 avatar Nov 04 '23 21:11 Shinigami92

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.

Scony avatar Dec 06 '23 21:12 Scony