From 79a778eea91fbae4399edf78dba86a7727755643 Mon Sep 17 00:00:00 2001 From: Thibault VINCENT Date: Sun, 3 May 2026 13:57:46 +0200 Subject: [PATCH] chore(taskfile): new tasks for goda and go-size-analyzer --- CLAUDE.md | 2 ++ CONTRIBUTING.md | 2 ++ Taskfile.yml | 18 ++++++++++++++++++ flake.nix | 2 ++ 4 files changed, 24 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index a8fc731..6569ba4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -67,6 +67,8 @@ everything. | Renovate dry-run | `task renovate:plan` | extracts deps + lists planned bumps without modifying files (debug `renovate.json5`) | | Renovate apply | `task renovate:patch` | applies the same bumps to the working tree, format-preserving, best-effort (skips ambiguous cases) | | Render chart README | `task doc:helm` | `dagger call helm-docs export --path=chart/README.md` | +| Visualize package deps | `task analysis:graph` | `goda graph ./...` → `dot -Tsvg` → `xdg-open` (writes to `dist/graph.svg`) | +| Inspect binary size | `task analysis:size` | builds the host-arch binary then opens `gsa --tui` on it | ## Dagger module architecture diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 095eed2..c7075ba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -630,6 +630,8 @@ releases. | `task renovate:patch` | Apply Renovate's planned bumps to the working tree (best-effort, format-preserving) | | `task doc` | Regenerate all documentation | | `task doc:helm` | Regenerate chart/README.md only (Dagger) | +| `task analysis:graph` | Render & open the full package dependency graph (goda + graphviz) | +| `task analysis:size` | Build the host-arch binary then explore its size with `gsa --tui` | ## Troubleshooting diff --git a/Taskfile.yml b/Taskfile.yml index 3750a2f..49f974c 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -405,3 +405,21 @@ tasks: desc: Regenerate chart/README.md from values.yaml + .gotmpl cmds: - dagger call helm-docs export --path=chart/README.md + + # ─── Analysis ──────────────────────────────────────────────────────────── + analysis:graph: + desc: "Render & open the full package dependency graph (goda → graphviz → xdg-open)" + # Output sits under dist/ so it inherits the repo's "build outputs + # live in dist/" convention. Caveat: `task build` and + # `task image:*` use `goreleaser --clean`, which wipes dist/ — + # re-run this task if the SVG disappears. + cmds: + - mkdir -p dist + - goda graph ./... | dot -Tsvg > dist/graph.svg + - xdg-open dist/graph.svg 2>/dev/null || open dist/graph.svg 2>/dev/null || echo "Graph saved to dist/graph.svg — open it manually." + + analysis:size: + desc: "Inspect host-arch binary size (gsa TUI, compact view) — builds first" + deps: [build] + cmds: + - gsa ./dist/x509-certificate-exporter --tui diff --git a/flake.nix b/flake.nix index 9392ceb..d56e8ab 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,8 @@ cosign rekor-cli goda + graphviz # `dot`, used by `task analysis:graph` to render goda's DOT output + xdg-utils # `xdg-open`, used by `task analysis:graph` to open the SVG ]); }; });