Skip to main content

Godot Scene Signal Auditor

Static CI checks for Godot scene signal connections, scene contracts, signal declarations, exported script properties, node groups, autoload signal usage, and coupling patterns that become hard to debug in larger projects.

The analyzer is deliberately conservative. It reports only what it can infer from .tscn and .gd files without running Godot.

Install

python -m pip install -e .

When published:

python -m pip install godot-scene-signal-auditor

Quick Start

godot-signal-audit C:\Projects\MyGame --strict-stale-connections
godot-signal-audit . --autoload EventBus,SignalBus
godot-signal-audit . --contract scene-contract.json
godot-signal-audit . --contract scene-contract.json --baseline-contract previous-scene-contract.json
godot-signal-audit . --format mermaid --output docs\SIGNAL_GRAPH.md
godot-signal-audit . --format json --output signal-report.json

Run the sample:

godot-signal-audit examples\tiny-godot-project --format mermaid --fail-on none
godot-signal-audit examples\tiny-godot-project --contract examples\tiny-godot-project\scene-contract.json --format json

What It Checks

  • Persistent scene connections in .tscn files.
  • Target method existence when the target script is resolvable.
  • GDScript signal declarations and method names.
  • Configured autoload signal connect usage.
  • Optional JSON or TOML scene contracts for required nodes, node groups, connections, script methods, script signals, exported script properties, and baseline contract diffs.
  • Mermaid signal graph output.
  • Report metadata and readable rule explanations in text and JSON output.

Scene Contracts

Use --contract to enforce a small scene API before refactors. Contracts can target exact scene paths or glob-style path_pattern values.

{
  "scenes": [
    {
      "path": "scenes/menu.tscn",
      "required_nodes": [".", "StartButton"],
      "required_connections": [
        {
          "from": "StartButton",
          "signal": "pressed",
          "to": ".",
          "method": "_on_start_pressed"
        }
      ],
      "script_methods": {
        ".": ["_ready", "_on_start_pressed"]
      },
      "script_signals": {
        ".": ["menu_opened"]
      },
      "script_exports": {
        ".": ["menu_title"]
      },
      "node_groups": {
        ".": ["menu_root"],
        "StartButton": ["primary_action"]
      }
    }
  ]
}

TOML files use the same field names with [[scenes]] entries. Contract violations are reported as errors and respect --fail-on.

When a refactor changes the contract intentionally, keep a copy of the previous contract and compare it with the new one:

godot-signal-audit . --contract scene-contract.json --baseline-contract previous-scene-contract.json --format json --fail-on none

The baseline comparison reports warnings for removed scene targets, required nodes, required connections, script methods, script signals, exported properties, and node groups. That makes breaking scene API changes visible in review without failing builds unless your --fail-on threshold includes warnings.

Documentation

Development

python -m pip install -e .
python -m unittest discover -s tests -v
godot-signal-audit examples\tiny-godot-project --format mermaid --fail-on none

Examples use generic scene and signal names so the repository can be published safely.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

godot_scene_signal_auditor-0.1.5.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

godot_scene_signal_auditor-0.1.5-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file godot_scene_signal_auditor-0.1.5.tar.gz.

File metadata

File hashes

Hashes for godot_scene_signal_auditor-0.1.5.tar.gz
Algorithm Hash digest
SHA256 725ca924dfc76dc0ff05f3b276a0d203ccec3d9f5f8e1d3259a4acec3ee9041d
MD5 ce3c665318feb946d63d04e99cdae0ec
BLAKE2b-256 69bd606ba14a435813f2a85bce0c813d3200a4b8771cb46e5091d1b17b84fd0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_scene_signal_auditor-0.1.5.tar.gz:

Publisher: publish-scene-signal-auditor.yml on NonniGB/godot-production-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godot_scene_signal_auditor-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for godot_scene_signal_auditor-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cd928037b64afa6cb4cb03f498330dfdd7d50d533f70dd8ef70c31be2c8e85e3
MD5 2e3431ebcaaa3f6827553451a00459ae
BLAKE2b-256 9d3f806844f1c10adeb06d658664b74c95ce8f8c46b0fc74173d9a9053233c0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_scene_signal_auditor-0.1.5-py3-none-any.whl:

Publisher: publish-scene-signal-auditor.yml on NonniGB/godot-production-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page