{"id":50542596,"url":"https://github.com/continuous-delphi/delphi-callgraph","last_synced_at":"2026-06-03T21:01:36.547Z","repository":{"id":358327454,"uuid":"1240885081","full_name":"continuous-delphi/delphi-callgraph","owner":"continuous-delphi","description":"Call graph and dependency analyzer for Delphi source code with JSON, DOT, text outputs","archived":false,"fork":false,"pushed_at":"2026-05-16T19:56:55.000Z","size":29,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-16T21:36:54.707Z","etag":null,"topics":["call-graph","continuous-delphi","continuous-integration","delphi","dependency-graph","graphviz","incubator","object-pascal","pasdcoc","powershell","pwsh","rad-studio","radstudio","source-code-visualization"],"latest_commit_sha":null,"homepage":"https://github.com/continuous-delphi","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/continuous-delphi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T17:33:57.000Z","updated_at":"2026-05-16T19:56:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/continuous-delphi/delphi-callgraph","commit_stats":null,"previous_names":["continuous-delphi/delphi-callgraph"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/continuous-delphi/delphi-callgraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuous-delphi%2Fdelphi-callgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuous-delphi%2Fdelphi-callgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuous-delphi%2Fdelphi-callgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuous-delphi%2Fdelphi-callgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/continuous-delphi","download_url":"https://codeload.github.com/continuous-delphi/delphi-callgraph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/continuous-delphi%2Fdelphi-callgraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33878990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["call-graph","continuous-delphi","continuous-integration","delphi","dependency-graph","graphviz","incubator","object-pascal","pasdcoc","powershell","pwsh","rad-studio","radstudio","source-code-visualization"],"created_at":"2026-06-03T21:01:35.764Z","updated_at":"2026-06-03T21:01:36.541Z","avatar_url":"https://github.com/continuous-delphi.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# delphi-callgraph\n\n![delphi-callgraph logo](https://continuous-delphi.github.io/assets/logos/delphi-callgraph-480x270.png)\n\n\n[![Delphi](https://img.shields.io/badge/delphi-red)](https://www.embarcadero.com/products/delphi)\n[![CI](https://github.com/continuous-delphi/delphi-callgraph/actions/workflows/ci.yml/badge.svg)](https://github.com/continuous-delphi/delphi-callgraph/actions/workflows/ci.yml)\n[![GitHub Release](https://img.shields.io/github/v/release/continuous-delphi/delphi-callgraph?display_name=release)](https://github.com/continuous-delphi/delphi-callgraph/releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/continuous-delphi/delphi-callgraph)\n[![Continuous Delphi](https://img.shields.io/badge/org-continuous--delphi-red)](https://github.com/continuous-delphi)\n\nCall graph and dependency analyzer wrapper for Delphi source code, with JSON,\nDOT, and text outputs.\n\n## Overview\n\n`delphi-callgraph` wraps graph engines behind one PowerShell command surface.\nThe default engine is `radCallGraph.exe`, which can emit JSON, DOT, and text\nsummary output from Delphi source. The wrapper also supports DOT dependency\ngraphs from PasDoc and from the Delphi compiler GraphViz option.\n\nDesigned for use as a standalone command and as a future bundled tool inside\n[delphi-powershell-ci](https://github.com/continuous-delphi/delphi-powershell-ci).\n\n## Running the Tool\n\n```powershell\npwsh -File .\\source\\delphi-callgraph.ps1 -Path source `\n    -Formats json,dot,txt -OutputDir artifacts\\callgraph\n```\n\nWith an explicit engine path:\n\n```powershell\npwsh -File .\\source\\delphi-callgraph.ps1 -Path source `\n    -EnginePath C:\\tools\\radCallGraph.exe `\n    -Class TMyService -Formats json,dot\n```\n\n## PowerShell Compatibility\n\nRuns on Windows PowerShell 5.1 (`powershell.exe`) and PowerShell 7+ (`pwsh`).\nThe test suite requires PowerShell 7+.\n\n## Supported Engines\n\n| Engine | Default executable | Outputs | Notes |\n|---|---|---|---|\n| `radCallGraph` | `radCallGraph.exe` | `json`, `dot`, `txt` | Default engine for call graph analysis |\n| `PasDoc` | `pasdoc.exe` / `pasdoc` | `dot` | Uses `--graphviz-uses` and `--graphviz-classes` |\n| `DCC` | `dcc32.exe` / `dcc32` | `dot` | Uses compiler `--graphviz` output |\n\n## Parameters\n\n| Parameter | Default | Description |\n|---|---|---|\n| `-Path` | | Source files or directories to analyze. |\n| `-Engine` | `radCallGraph` | Graph engine: `radCallGraph`, `PasDoc`, or `DCC`. |\n| `-EnginePath` | auto-detect | Explicit path to the engine executable. |\n| `-OutputDir` | `callgraph` | Directory for generated graph files. |\n| `-Formats` | `json` for radCallGraph, `dot` otherwise | Comma-separated formats: `json`, `dot`, `txt`. |\n| `-JsonFile` | `callgraph.json` | Explicit JSON output path. |\n| `-DotFile` | engine-specific | Explicit DOT/GV output path. |\n| `-SummaryFile` | `callgraph.txt` | Explicit text summary path. |\n| `-Class` | | radCallGraph class filter. |\n| `-Annotations` | `$true` | Include `{cg:...}` annotation data for radCallGraph. |\n| `-Deterministic` | `$true` | Pass `--deterministic` to radCallGraph for reproducible output without timestamps. |\n| `-GraphKind` | engine default | `call`, `uses`, `classes`, `dependency`, or `all`. |\n| `-GraphVizUses` | off | PasDoc unit dependency graph. |\n| `-GraphVizClasses` | off | PasDoc class hierarchy graph. |\n| `-PasDocOptions` | `@()` | Extra PasDoc options passed before source paths. |\n| `-ProjectFile` | | DCC project file for compiler GraphViz output. |\n| `-GraphVizExclude` | `@()` | DCC unit patterns for `--graphviz-exclude`. |\n| `-EngineArguments` | `@()` | Extra arguments passed to the selected engine. |\n| `-TimeoutSeconds` | `300` | Maximum engine runtime before failure. |\n| `-OutputFile` | | Structured JSON result file for CI integration. |\n\n## radCallGraph Examples\n\n```powershell\npwsh -File .\\source\\delphi-callgraph.ps1 -Path source `\n    -Engine radCallGraph `\n    -Formats json,dot,txt `\n    -OutputDir artifacts\\callgraph\n```\n\n```powershell\npwsh -File .\\source\\delphi-callgraph.ps1 -Path source `\n    -Class TOrderService `\n    -Annotations:$false `\n    -JsonFile artifacts\\callgraph\\orders.json\n```\n\n## PasDoc Examples\n\nGenerate a unit dependency graph:\n\n```powershell\npwsh -File .\\source\\delphi-callgraph.ps1 -Path source `\n    -Engine PasDoc `\n    -GraphKind uses `\n    -Formats dot `\n    -OutputDir artifacts\\pasdoc-graph\n```\n\nGenerate both unit and class graphs:\n\n```powershell\npwsh -File .\\source\\delphi-callgraph.ps1 -Path source `\n    -Engine PasDoc `\n    -GraphKind all `\n    -Formats dot\n```\n\nPasDoc writes `GVUses.dot` and/or `GVClasses.dot` in the output directory.\n\n## Delphi Compiler GraphViz Example\n\n```powershell\npwsh -File .\\source\\delphi-callgraph.ps1 `\n    -Engine DCC `\n    -ProjectFile source\\MyApp.dpr `\n    -GraphVizExclude System.*,Vcl.*,Winapi.* `\n    -Formats dot `\n    -OutputDir artifacts\\compiler-graph\n```\n\nThe compiler writes a `\u003cproject\u003e.gv` GraphViz file.\n\n## Structured Result\n\nUse `-OutputFile` to write a JSON summary for CI tooling:\n\n```json\n{\n  \"engine\": \"radCallGraph\",\n  \"inputs\": [\"C:/repo/source\"],\n  \"exitCode\": 0,\n  \"success\": true,\n  \"outputDir\": \"C:/repo/artifacts/callgraph\",\n  \"formats\": [\"json\", \"dot\"],\n  \"files\": {\n    \"json\": \"C:/repo/artifacts/callgraph/callgraph.json\",\n    \"dot\": \"C:/repo/artifacts/callgraph/callgraph.dot\"\n  },\n  \"summary\": {\n    \"files\": 34,\n    \"nodes\": 389,\n    \"classes\": 25,\n    \"standalone\": 36,\n    \"edges\": 1143\n  },\n  \"duration\": 1.2\n}\n```\n\n## Exit Codes\n\n```text\n0 = success\n1 = unexpected error\n2 = invalid arguments\n3 = engine executable not found\n4 = input file or directory not found\n5 = graph engine failed or timed out\n```\n\n## Running Tests\n\nRequires PowerShell 7+, Pester 5.7+, and PSScriptAnalyzer.\n\n```powershell\n./tests/run-tests.ps1\n```\n\n## References\n\n- [PasDoc command line GraphViz options](https://pasdoc.github.io/CommandLine.html)\n- [Embarcadero Delphi compiler GraphViz export](https://docwiki.embarcadero.com/RADStudio/en/GraphViz_file_export_for_the_Delphi_Compiler)\n\n## Continuous-Delphi\n\nThis tool is part of the [Continuous-Delphi](https://github.com/continuous-delphi)\necosystem, focused on strengthening Delphi's continued success.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontinuous-delphi%2Fdelphi-callgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontinuous-delphi%2Fdelphi-callgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontinuous-delphi%2Fdelphi-callgraph/lists"}