Skip to main content

Static audits for Godot scene signal connections, scene contracts, exported properties, node groups, missing handlers, and autoload usage.

Project description

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 . --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, and exported script properties.
  • 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.

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.4.tar.gz (12.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.4-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for godot_scene_signal_auditor-0.1.4.tar.gz
Algorithm Hash digest
SHA256 92c8893fb7ea06467d90213c984c938792ebd0b2363ca86b07794c2e877cd180
MD5 2ae35ef0b07cc27772d46a79a0a3d4a7
BLAKE2b-256 b0cfbebbb414f0048765e5342edf77f01b701455e578dcc2e455c62a94437639

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for godot_scene_signal_auditor-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8ed2d665da96f1c6a488a3eb0b7e398eb9a881430899c20db2d92cf1099b165a
MD5 fd5019f281d15b2a7560fca1e8736ad9
BLAKE2b-256 8928e5359b98d5f3d5002fec80875bd60ae8cf6ce46336ac4ccb4dbecaaa53d6

See more details on using hashes here.

Provenance

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