A fast, extensible linter engine with live framework introspection. Built in Rust.
Thorn is a library — it provides the linting engine, plugin API, and CLI toolkit. Framework plugins build on thorn to create their own linter binaries.
| Plugin | Binary | Framework |
|---|---|---|
| thorn-django | thorn-django |
Django / DRF |
┌─────────────────────────────────────────────┐
│ thorn-cli │
│ CLI toolkit: run() builds the binary │
├─────────────────────────────────────────────┤
│ thorn-core │
│ File discovery, parallel linting (Rayon) │
├─────────────────────────────────────────────┤
│ thorn-api │
│ Plugin trait, Diagnostic, Level, AppGraph │
└─────────────────────────────────────────────┘
Plugins depend on these crates and ship their own binary:
// thorn-django/src/bin/thorn.rs
fn main() {
thorn_cli::run(|| vec![Box::new(thorn_django::DjangoPlugin::new())]);
}- Create a new Rust project
- Depend on
thorn-api(for the Plugin trait) andthorn-cli(for the CLI) - Implement the
Plugintrait - Ship a binary that calls
thorn_cli::run()with your plugin
See thorn-django as a reference implementation.
| Crate | Description |
|---|---|
thorn-api |
Plugin trait, Diagnostic, AppGraph, Level — the stable API |
thorn-core |
Linter engine — file discovery, parallel AST linting, graph checks |
thorn-cli |
CLI toolkit — thorn_cli::run(plugins) builds a complete linter binary |
MIT