feat(cli): add files --language, audit include/exclude, impact edgeKind, accurate symbol count#87
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four CLI/static-graph improvements from the v0.17.0 Godot feedback (P1/P4/P5/P2):
files --language:--filterkeeps its upstream path-prefix meaning (now with help +value_name=DIR); a NEW--language <LANG>filters by language using the exact namesstatusprints (e.g.gdscript,godot_resource). Unknown language → empty result.audit --include/--exclude:-phelp 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.edgeKind:audit --impact --jsonnow carriesedgeKindper affected ref (from the graph edge kind / unresolved reference kind). Surfaces the structural relation, not a domain label.filesnow shows a per-file symbol count recomputed from the livenodestable (so.tscn/.tresframework marker nodes are counted, matchingquery). Display-only — the storedfiles.node_countcolumn (which IS golden-compared) is never rewritten.This is a downstream-only CLI surface improvement;
--filterstays aligned with upstream colby (v1.1.1).Verification
make cigreen locally (fmt + clippy + test + guardrail)git diff --stat reference/empty (display-only + CLI-layer filtering + CLI-only AffectedRef = golden-neutral);cargo test -p codegraph-bench4/4files.rs(5) +audit.rs(+include/exclude + dangling) + graphgodot_resource_audit.rs(+edgeKind + dedup-at-shared-site)