Skip to main content

Static audits for Godot scene signal connections, emitted signals, missing handlers, and autoload usage.

Project description

Godot Scene Signal Auditor

Static CI checks for Godot scene signal connections, signal declarations, 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 . --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, connections, script methods, and script signals.
  • 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"]
      }
    }
  ]
}

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

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.

Project details


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.3.tar.gz (11.9 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.3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for godot_scene_signal_auditor-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1d5df6ded9d357a651a7ba33c37bc3a6d5ab28df36e5bdf8ecc8893cccd71d8e
MD5 964ee624d7aaf4639eac77a6171d691b
BLAKE2b-256 0cefc85faebd7d0d92a6c164408189b067fcd22af7378714bd3227cc3e71d7ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_scene_signal_auditor-0.1.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for godot_scene_signal_auditor-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 15ef1a1bdcdd772be9739758d33c2190aaed1fbe5f50892162c44a2a3b8c6738
MD5 28bdb3194707ca3a19436c28c7b399f9
BLAKE2b-256 3c4304963fb0b494cfeba4d813694d3bbb5682f9c916a8d8dba9128c44c1e44c

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_scene_signal_auditor-0.1.3-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