Godot 4 projects break in the same few ways when code is written from memory — or by an AI assistant trained mostly on Godot 3: yield instead of await, .instance() instead of .instantiate(), connect("pressed", self, "_on_pressed"), KinematicBody2D, export var, deg2rad, or an API that never existed.
godot-guard puts a scanner in the editor's bottom panel. Press Scan project and every occurrence is listed with the file and line, the exact text it found, and what to write instead. Double-click a row to jump to it.
What it checks
92 rules over .gd, .tscn and .tres:
- Godot 3 idioms that are errors in 4.x —
yield,funcref,.instance(), the 3-argumentconnect(),KinematicBody2D,Spatial,Pool*Array,export/onready/toolas keywords,move_and_slide(velocity),deg2rad/rad2deg,rand_range,set_shader_param,OS.get_ticks_msec,.empty(), lowercaseColorconstants, and more. - Invented APIs — calls that look plausible and do not exist, such as
Signal.any()or awaiting aSceneTreeTimerinstead of itstimeoutsignal. - Deprecations inside 4.x — for example
TileMap(deprecated since 4.3) in both scripts and scene files, reported as warnings rather than errors.
Every rule carries the official documentation URL for the change, so a finding can be checked rather than trusted.
Matches inside comments, strings and triple-quoted blocks are ignored, so a line like # yield(x, "y") is not reported.
Install
Copy addons/godot_guard/ into your project and enable godot-guard in Project > Project Settings > Plugins.
What it is not
It is not a formatter, and it does not edit your files — it only reports. It runs entirely offline: pure GDScript, no Python, no external tool, no network access.
Also in the repository
The same rules as command-line scripts (api_guard.py, plus a scene-tree mapper and a version pin) for use in CI or with an external coding agent. The test suite asserts the editor scanner and the command-line scanner report exactly the same findings.
Verified against Godot 4.7.2. MIT licensed.
Changelog for version 0.1.0
No changelog provided for this version.