Expand description
project.godot autoload parsing (Playbook §3.M4).
project.godot is a Godot ConfigFile (INI-like: [section] headers, key=value,
typed-Variant values). We do not evaluate full Variant values — the analyzer needs only
the [autoload] section, which is line-oriented Name="*res://path". This is a deliberate
minimal scan (not a VariantParser port): track the current [section], and within
[autoload] split each line on the first =, take the bare LHS as the autoload name and the
dequoted RHS as the resource path. The leading * on the path is the singleton/global
flag (project_settings.cpp: begins_with("*") → is_singleton, then substr(1) strips it);
a non-* autoload is loaded at /root/Name but is not a global identifier.
Pure (fn(&str) -> Vec<AutoloadEntry>) and wasm-clean — the host injects the text.
Structs§
- Autoload
Entry - One
[autoload]entry fromproject.godot.
Functions§
- parse_
autoloads - Parse the
[autoload]entries fromproject.godottext. Robust to comments, blank lines, and other sections; never panics on malformed input (a bad line is skipped). - parse_
engine_ version - Parse the Godot engine
(major, minor)version fromproject.godot’s[application]config/features=PackedStringArray("4.3", "Forward Plus", …)line. Godot writes the engine version as the first<major>.<minor>entry of that array; the rest are rendering/feature tags. Returns the first version-shaped entry, orNoneif the line is absent or carries none. A deliberate minimal scan (not aVariantParserport); robust to malformed input (never panics). - parse_
warning_ settings - Parse the
debug/gdscript/warnings/*settings fromproject.godotinto aWarningSettings, starting from the engine default forengine. Keys live under[debug]asgdscript/warnings/<tail>(Godot groups a setting by its first path segment).<tail>isenable/treat_warnings_as_errors/exclude_addons(bools) or a code’s lowercased setting-name mapped to a0|1|2(Ignore/Warn/Error) level. A deliberate minimal scan (not aVariantParserport); robust to malformed input (a bad line is skipped).directory_rules(Godot master, a typed-Variant dict) is not parsed — seeTECH_DEBT.md.