
AngelosZou/graphlint
42Last commit Aug 15, 2026
graphlint DSH plugin
Graphlint analyzes dependency graphs to detect dead code unreachable from entry points. It supports Python, Rust, C#, TypeScript/JavaScript with language-specific awareness. It provides CLI, Python API, and a DSH plugin for AI agent integration.
How to install the graphlint DSH plugin
dsh plugin --profile web add dsh-graphlintCopying does not run this command. Review the repository and version before installing the graphlint DSH plugin.
graphlint DSH plugin data source
graphlint DSH plugin snapshot date: Aug 16, 2026
discovered
What the graphlint DSH plugin can do
- Dead code detection via graph traversal
- Multi-language support (Python, Rust, C#, TypeScript/JavaScript)
- 35+ built-in entry point detection rules with custom rule support
- 11 warning types including circular references, unused imports, write-only variables
- Incremental updates for efficient re-indexing
Where the graphlint DSH plugin fits
- Cleaning dead code from AI-generated codebases to reduce context window pollution
- CI pipeline integration with --fail-on exit codes for automated quality gates
- Self-cleaning AI agents that analyze and remove unreachable code
- Library analysis using --public-as-entry to treat all public items as entry points
Who the graphlint DSH plugin is for
- AI developers using LLM-based coding agents
- Software engineers maintaining large codebases with AI-assisted code generation
- DevOps engineers integrating code quality checks into CI/CD pipelines
graphlint DSH plugin limitations
- Static analysis only; cannot detect runtime linkage like getattr or importlib, which may cause false positives
- Python dynamic import mechanisms may lead to false positives in heavily runtime-driven codebases without custom entry rules
graphlint DSH plugin: from the repository README
Quoted from the AngelosZou/graphlint README, the upstream source of the graphlint DSH plugin. Copyright remains with the original authors.
**Dead code detection for AI-generated codebases.** AI agents generate code rapidly, leaving behind dead and redundant code that pollutes the LLM's context window and dilutes attention. Graphlint analyzes your codebase's dependency graph to identify entry points and **detect dead code** — components unreachable from any entry point — so agents can self-clean and keep the codebase lean. ## Supported Languages | Language | Status | Parser | Features | |----------|--------|--------|----------| | **Python** (`.py`) | Built-in | `ast` (stdlib) | Decorators, type annotations, dynamic imports, framework-aware entry detection | | **Rust** (`.rs`) | Built-in (opt-in deps) | `tree-sitter` | Attribute macros, traits, `pub` visibility, `macro_rules!` | | **C#** (`.cs`) | Built-in (opt-in deps) | `tree-sitter` | Partial classes, properties/indexers/events, attributes, `.csproj` awareness, test framework entries | | **TypeScript / JavaScript** (`.ts` `.tsx` `.js` `.jsx` `.mts` `.cts` `.mjs` `.cjs`) | Built-in (opt-in deps) | `tree-sitter` | JSX/React components, Next.js pages, NestJS decorators, Jest/Vitest tests, import/export analysis | Install optional language support: ```bash pip insta
Read the full READMERepository license: MIT
graphlint DSH plugin questions
How do I install the Graphlint DSH plugin?
Run `dsh plugin --profile web add dsh-graphlint` in your terminal, then restart DSH web. Alternatively, you can clone the repository and link a local build with `dsh plugin --profile web add link:./integrations/dsh` after running `npm run build` in the integrations/dsh directory.
Which languages does Graphlint support?
Graphlint supports Python (built-in with stdlib ast), Rust, C#, TypeScript, and JavaScript. Rust, C#, and TypeScript/JavaScript require optional tree-sitter dependencies installed via `pip install graphlint[rust]`, `graphlint[csharp]`, or `graphlint[typescript]`.
How do I detect dead code in my project?
Run `graphlint query --warn-types dead_code` in your project directory. For JSON output, add `--json`. You can also use the Python API: `from graphlint.api import query; result = query(warn_types='dead_code', json_output=True)`.
Can I add custom entry points for my framework?
Yes, Graphlint supports configurable entry templates. You can add custom rules to `.graphlint/config.json` using patterns like `function_call:`, `function_def:`, `decorator:`, `file_match:`, and more. See the documentation for details.
What are the limitations of Graphlint?
Graphlint is static analysis only and cannot detect runtime linkage like `getattr` or `importlib`, which may cause false positives. Python dynamic imports are especially challenging. It also has limited macro expansion support for Rust and may miss members called only through reflection in C#.