Skip to content

feat(cli): add files --language, audit include/exclude, impact edgeKind, accurate symbol count#87

Merged
sunerpy merged 1 commit into
mainfrom
feat/godot-cli-filters-impact
Jun 27, 2026
Merged

feat(cli): add files --language, audit include/exclude, impact edgeKind, accurate symbol count#87
sunerpy merged 1 commit into
mainfrom
feat/godot-cli-filters-impact

Conversation

@sunerpy

@sunerpy sunerpy commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

Four CLI/static-graph improvements from the v0.17.0 Godot feedback (P1/P4/P5/P2):

  • P1 — files --language: --filter keeps its upstream path-prefix meaning (now with help + value_name=DIR); a NEW --language <LANG> filters by language using the exact names status prints (e.g. gdscript, godot_resource). Unknown language → empty result.
  • P4 — audit --include/--exclude: -p help clarified (it is the project root, not a filter); added repeatable --include/--exclude <PREFIX> CLI-layer post-filters (e.g. --exclude addons/ to denoise) applied to orphans/dangling/impact. Graph functions stay pure.
  • P5 — impact edgeKind: audit --impact --json now carries edgeKind per affected ref (from the graph edge kind / unresolved reference kind). Surfaces the structural relation, not a domain label.
  • P2 — accurate symbol count: files now shows a per-file symbol count recomputed from the live nodes table (so .tscn/.tres framework marker nodes are counted, matching query). Display-only — the stored files.node_count column (which IS golden-compared) is never rewritten.

This is a downstream-only CLI surface improvement; --filter stays aligned with upstream colby (v1.1.1).

Verification

  • make ci green locally (fmt + clippy + test + guardrail)
  • git diff --stat reference/ empty (display-only + CLI-layer filtering + CLI-only AffectedRef = golden-neutral); cargo test -p codegraph-bench 4/4
  • New tests: CLI files.rs (5) + audit.rs (+include/exclude + dangling) + graph godot_resource_audit.rs (+edgeKind + dedup-at-shared-site)
  • Stacked on fix(graph): stop audit --dangling reporting bare signal methods as missing paths #85 (rebased onto main after that merged)

…nd, accurate symbol count

P1: `files --filter` keeps its upstream path-prefix meaning and now has help
text + `value_name=DIR`; a new `--language <LANG>` filters by the canonical
language string (matching `status` names). Unknown languages yield an empty
result with no hint.

P4: `audit -p` help clarifies it is the project root, not a result filter.
New repeatable `--include <PREFIX>` / `--exclude <PREFIX>` narrow the orphan /
dangling / impact output via a `/`-normalized prefix match applied in the CLI
layer; the graph functions stay pure.

P5: `audit --impact --json` affected sites now carry `edgeKind` (the graph
edge kind: references/instantiates, or the unresolved ref kind). Sort/dedup
stay deterministic.

P2: `.tscn`/`.tres` files showed `0 symbols` in `files` because their
framework marker nodes are not folded into the stored `files.node_count`. The
displayed count is now recomputed from the live `nodes` table (display-only via
new `Store::node_count_by_file_path`); the golden-compared `files.node_count`
column is never rewritten, so golden output is byte-identical.
@sunerpy sunerpy merged commit 8b07975 into main Jun 27, 2026
4 checks passed
@sunerpy sunerpy deleted the feat/godot-cli-filters-impact branch June 27, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant