From 4b55a41ece6c7a01627f1fdc7a7ab89079189a32 Mon Sep 17 00:00:00 2001 From: endergebnis Date: Tue, 8 Sep 2026 22:48:45 +0200 Subject: [PATCH] Add --exclude, detect/inspect_bundle tools, Spring/test entry-point detection - Global `--exclude ` (repeatable) on search symbols/text and find dead/dead-symbols, with built-in defaults (vendor/, node_modules/, *.min.*, dist/, build/). Minified/vendored assets stay indexed for import edges but are filtered from query results (bootstrap.min.css noise: 90% of dead symbols -> gone). - `detect` CLI / `codebase_detect` MCP tool: probe a directory's languages and stack from file extensions and manifest files before indexing. - `inspect bundle` CLI / `inspect_bundle` MCP tool: symbol source + direct callers + direct importers in one call (3 round-trips -> 1). - find dead-symbols: skip CSS files and structural kinds (package, heading*) as non-callable; extend framework-wired detection with JUnit/Spring annotations (@Test, @Service, @Component, ...) and pytest/JUnit test-class naming (Test*, test_*, *Test, *Tests), plus `test_` methods reported as `member` kind. - README: correct CSS statement, document new tools/limits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Cargo.lock | 1 + Cargo.toml | 1 + README.md | 39 ++++++---- src/cli.rs | 13 ++++ src/config.rs | 101 ++++++++++++++++++++++++ src/main.rs | 20 +++-- src/mcp/mod.rs | 87 +++++++++++++++++++-- src/ops.rs | 190 +++++++++++++++++++++++++++++++++++++++++++--- src/search/mod.rs | 41 ++++++++-- 9 files changed, 452 insertions(+), 41 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c92d91a..4f25651 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -399,6 +399,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", + "globset", "ignore", "rayon", "regex", diff --git a/Cargo.toml b/Cargo.toml index 2b24cdb..509db8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ license = "MIT" clap = { version = "4", features = ["derive"] } rusqlite = { version = "0.31", features = ["bundled"] } ignore = "0.4" +globset = "0.4" rayon = "1" xxhash-rust = { version = "0.8", features = ["xxh3"] } serde = { version = "1", features = ["derive"] } diff --git a/README.md b/README.md index 2790d0e..5d32792 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,10 @@ context tokens. Language coverage (via ctags): Rust, Java, Python, C/C++, TypeScript, JavaScript, HTML, C#. HTML import edges are extracted directly (not via ctags), and ``/`