Skip to content

Code Analysis

Free All code analysis tools work from the filesystem — no addon required.

GodotIQ parses your .gd scripts, .tscn scene files, and .tres resources to build a complete understanding of your project’s code structure. It doesn’t just search text — it understands dependencies, signal connections, inheritance chains, and naming conventions.

This means you can ask questions like “what would break if I rename this signal?” or “show me everything that depends on OrderManager.gd” and get accurate, comprehensive answers instead of grep-like approximations.


Maps dependencies between scripts, scenes, and resources. Shows what each file depends on and what depends on it.

  • Understanding how files are connected before making changes
  • Finding all scenes that use a particular script or resource
  • Identifying circular dependencies or tightly coupled modules
ParameterTypeDefaultDescription
pathstring"res://"File or directory to analyze. Use a file path for a single file’s deps, or a directory for the full graph
depthint3Maximum dependency depth to traverse
detailstring"normal"Output verbosity: brief, normal, full
include_resourcesbooltrueInclude .tres resource files in the graph

Prompt: “What depends on my OrderManager script?”

Tool call
{
"tool": "dependency_graph",
"args": {
"path": "res://scripts/managers/OrderManager.gd",
"detail": "normal"
}
}
Output
{
"file": "res://scripts/managers/OrderManager.gd",
"depends_on": [
"res://scripts/data/Order.gd",
"res://scripts/data/MenuItem.gd",
"res://scripts/autoloads/EventBus.gd"
],
"depended_on_by": [
"res://scenes/ui/OrderPanel.tscn",
"res://scenes/gameplay/Kitchen.tscn",
"res://scripts/managers/GameManager.gd",
"res://tests/test_order_flow.gd"
],
"dependency_count": { "direct": 3, "transitive": 7 },
"dependent_count": { "direct": 4, "transitive": 12 }
}
  • Use depth: 1 for direct dependencies only — useful for quick checks
  • Run on res:// to get the full project dependency graph (use detail: "brief" for large projects)
  • Circular dependencies are flagged with a warning in the output

Maps all signal connections across the project. Shows signal definitions, connections (both in-scene and code-based), and complete signal chains from emitter to final receiver.

  • Understanding how events propagate through the project
  • Finding all handlers for a specific signal
  • Debugging signal chains that cross multiple scenes
ParameterTypeDefaultDescription
pathstring"res://"File or directory to analyze
signal_namestringnullFilter to a specific signal name
detailstring"normal"Output verbosity
include_builtinsboolfalseInclude Godot built-in signals (ready, tree_entered, etc.)

Prompt: “Show me all connections for the order_completed signal.”

Tool call
{
"tool": "signal_map",
"args": {
"signal_name": "order_completed",
"detail": "normal"
}
}
Output
{
"signal": "order_completed",
"definitions": [
{
"file": "res://scripts/managers/OrderManager.gd",
"line": 8,
"signature": "signal order_completed(order: Order)"
}
],
"connections": [
{
"from": "OrderManager",
"to": "OrderPanel",
"method": "_on_order_completed",
"source": "scene",
"scene_file": "res://scenes/gameplay/Kitchen.tscn"
},
{
"from": "OrderManager",
"to": "ScoreManager",
"method": "_on_order_completed",
"source": "code",
"file": "res://scripts/managers/GameManager.gd",
"line": 24
},
{
"from": "OrderManager",
"to": "SoundManager",
"method": "play_success",
"source": "code",
"file": "res://scripts/managers/OrderManager.gd",
"line": 45
}
],
"chain_length": 3,
"emitters": 1,
"receivers": 3
}
  • Without signal_name, returns all custom signals in the project — useful for getting a high-level signal architecture view
  • Set include_builtins: true if you need to see ready, process, input, etc.
  • Signal connections made in the scene editor and via connect() in code are both detected

Analyzes the blast radius of changing a specific file, class, signal, or method. Shows everything that would be affected by the change.

  • Before refactoring — “what breaks if I change this?”
  • Estimating the scope of a bug fix
  • Understanding which tests cover a piece of code
ParameterTypeDefaultDescription
targetstringrequiredWhat to check — file path, class name, signal name, or ClassName.method
change_typestring"modify"Type of change: "modify", "rename", "delete"
detailstring"normal"Output verbosity

Prompt: “What would break if I rename the OrderManager class?”

Tool call
{
"tool": "impact_check",
"args": {
"target": "OrderManager",
"change_type": "rename"
}
}
Output
{
"target": "OrderManager",
"change_type": "rename",
"impact": {
"direct": [
{
"file": "res://scenes/gameplay/Kitchen.tscn",
"reason": "References OrderManager as attached script"
},
{
"file": "res://scripts/managers/GameManager.gd",
"line": 12,
"reason": "Type hint: var order_mgr: OrderManager"
}
],
"transitive": [
{
"file": "res://scenes/ui/OrderPanel.tscn",
"reason": "Signal connection from OrderManager node"
}
],
"tests": [
"res://tests/test_order_flow.gd"
]
},
"summary": {
"files_affected": 4,
"signals_affected": 1,
"risk": "medium"
}
}
  • change_type: "delete" shows the most comprehensive impact — everything that references the target
  • The risk field gives a quick read: low (1-2 files), medium (3-10), high (10+)

Validates the project against conventions defined in .godotiq.json. Checks naming patterns, directory structure, script organization, and custom rules.

  • Enforcing team coding standards automatically
  • Running as a pre-commit check
  • Auditing an existing project against desired conventions
ParameterTypeDefaultDescription
pathstring"res://"File or directory to validate
rulesarray["all"]Specific rule categories: "naming", "structure", "signals", "exports"
detailstring"normal"Output verbosity

Prompt: “Check if my project follows our naming conventions.”

Tool call
{
"tool": "validate",
"args": {
"rules": ["naming", "structure"]
}
}
Output
{
"rules_checked": 12,
"violations": [
{
"rule": "naming.scripts.snake_case",
"severity": "warning",
"file": "res://scripts/UI/healthBar.gd",
"message": "Script filename should be snake_case: 'healthBar.gd' → 'health_bar.gd'"
},
{
"rule": "structure.scenes.matching_script",
"severity": "info",
"file": "res://scenes/enemies/Goblin.tscn",
"message": "Scene has no matching script file (expected res://scripts/enemies/Goblin.gd or attached)"
}
],
"passed": 10,
"failed": 2,
"summary": "10/12 rules passed"
}

  • Flow tracingtrace_flow follows data semantically, complementing static dependency_graph and signal_map analysis
  • Configuration — Configure validate rules in .godotiq.json
  • Guides: Workflows — Common code analysis workflow patterns